<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE DerivingStrategies #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE DerivingVia #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# LANGUAGE EmptyCase #-}</span><span>
</span><span id="line-4"></span><span class="hs-pragma">{-# LANGUAGE GeneralizedNewtypeDeriving #-}</span><span>
</span><span id="line-5"></span><span class="hs-pragma">{-# LANGUAGE InstanceSigs #-}</span><span>
</span><span id="line-6"></span><span class="hs-pragma">{-# LANGUAGE StandaloneDeriving #-}</span><span>
</span><span id="line-7"></span><span class="hs-pragma">{-# LANGUAGE Trustworthy #-}</span><span>
</span><span id="line-8"></span><span class="hs-pragma">{-# LANGUAGE TypeOperators #-}</span><span>
</span><span id="line-9"></span><span>
</span><span id="line-10"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- Module      :  Data.Functor.Contravariant</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- Copyright   :  (C) 2007-2015 Edward Kmett</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- License     :  BSD-style (see the file LICENSE)</span><span>
</span><span id="line-15"></span><span class="hs-comment">--</span><span>
</span><span id="line-16"></span><span class="hs-comment">-- Maintainer  :  libraries@haskell.org</span><span>
</span><span id="line-17"></span><span class="hs-comment">-- Stability   :  provisional</span><span>
</span><span id="line-18"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-19"></span><span class="hs-comment">--</span><span>
</span><span id="line-20"></span><span class="hs-comment">-- 'Contravariant' functors, sometimes referred to colloquially as @Cofunctor@,</span><span>
</span><span id="line-21"></span><span class="hs-comment">-- even though the dual of a 'Functor' is just a 'Functor'. As with 'Functor'</span><span>
</span><span id="line-22"></span><span class="hs-comment">-- the definition of 'Contravariant' for a given ADT is unambiguous.</span><span>
</span><span id="line-23"></span><span class="hs-comment">--</span><span>
</span><span id="line-24"></span><span class="hs-comment">-- @since 4.12.0.0</span><span>
</span><span id="line-25"></span><span class="hs-comment">----------------------------------------------------------------------------</span><span>
</span><span id="line-26"></span><span>
</span><span id="line-27"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Data.Functor.Contravariant</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-28"></span><span>  </span><span class="annot"><span class="hs-comment">-- * Contravariant Functors</span></span><span>
</span><span id="line-29"></span><span>    </span><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier">Contravariant</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-30"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#phantom"><span class="hs-identifier">phantom</span></a></span><span>
</span><span id="line-31"></span><span>
</span><span id="line-32"></span><span>  </span><span class="annot"><span class="hs-comment">-- * Operators</span></span><span>
</span><span id="line-33"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#%3E%24%3C"><span class="hs-operator">(&gt;$&lt;)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#%3E%24%24%3C"><span class="hs-operator">(&gt;$$&lt;)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#%24%3C"><span class="hs-operator">($&lt;)</span></a></span><span>
</span><span id="line-34"></span><span>
</span><span id="line-35"></span><span>  </span><span class="annot"><span class="hs-comment">-- * Predicates</span></span><span>
</span><span id="line-36"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Predicate"><span class="hs-identifier">Predicate</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-37"></span><span>
</span><span id="line-38"></span><span>  </span><span class="annot"><span class="hs-comment">-- * Comparisons</span></span><span>
</span><span id="line-39"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Comparison"><span class="hs-identifier">Comparison</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-40"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#defaultComparison"><span class="hs-identifier">defaultComparison</span></a></span><span>
</span><span id="line-41"></span><span>
</span><span id="line-42"></span><span>  </span><span class="annot"><span class="hs-comment">-- * Equivalence Relations</span></span><span>
</span><span id="line-43"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Equivalence"><span class="hs-identifier">Equivalence</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-44"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#defaultEquivalence"><span class="hs-identifier">defaultEquivalence</span></a></span><span>
</span><span id="line-45"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#comparisonEquivalence"><span class="hs-identifier">comparisonEquivalence</span></a></span><span>
</span><span id="line-46"></span><span>
</span><span id="line-47"></span><span>  </span><span class="annot"><span class="hs-comment">-- * Dual arrows</span></span><span>
</span><span id="line-48"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier">Op</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-49"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-50"></span><span>
</span><span id="line-51"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Control.Applicative.html"><span class="hs-identifier">Control.Applicative</span></a></span><span>
</span><span id="line-52"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Control.Category.html"><span class="hs-identifier">Control.Category</span></a></span><span>
</span><span id="line-53"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Function.html"><span class="hs-identifier">Data.Function</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Function.html#on"><span class="hs-identifier">on</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-54"></span><span>
</span><span id="line-55"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Functor.Product.html"><span class="hs-identifier">Data.Functor.Product</span></a></span><span>
</span><span id="line-56"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Functor.Sum.html"><span class="hs-identifier">Data.Functor.Sum</span></a></span><span>
</span><span id="line-57"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Functor.Compose.html"><span class="hs-identifier">Data.Functor.Compose</span></a></span><span>
</span><span id="line-58"></span><span>
</span><span id="line-59"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Monoid.html"><span class="hs-identifier">Data.Monoid</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Semigroup.Internal.html#Alt"><span class="hs-identifier">Alt</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Semigroup.Internal.html#All"><span class="hs-identifier">All</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-60"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Proxy.html"><span class="hs-identifier">Data.Proxy</span></a></span><span>
</span><span id="line-61"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Generics.html"><span class="hs-identifier">GHC.Generics</span></a></span><span>
</span><span id="line-62"></span><span>
</span><span id="line-63"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Prelude.html"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Base.html#."><span class="hs-operator">(.)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#id"><span class="hs-identifier">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-64"></span><span>
</span><span id="line-65"></span><span class="hs-comment">-- | The class of contravariant functors.</span><span>
</span><span id="line-66"></span><span class="hs-comment">--</span><span>
</span><span id="line-67"></span><span class="hs-comment">-- Whereas in Haskell, one can think of a 'Functor' as containing or producing</span><span>
</span><span id="line-68"></span><span class="hs-comment">-- values, a contravariant functor is a functor that can be thought of as</span><span>
</span><span id="line-69"></span><span class="hs-comment">-- /consuming/ values.</span><span>
</span><span id="line-70"></span><span class="hs-comment">--</span><span>
</span><span id="line-71"></span><span class="hs-comment">-- As an example, consider the type of predicate functions  @a -&gt; Bool@. One</span><span>
</span><span id="line-72"></span><span class="hs-comment">-- such predicate might be @negative x = x &lt; 0@, which</span><span>
</span><span id="line-73"></span><span class="hs-comment">-- classifies integers as to whether they are negative. However, given this</span><span>
</span><span id="line-74"></span><span class="hs-comment">-- predicate, we can re-use it in other situations, providing we have a way to</span><span>
</span><span id="line-75"></span><span class="hs-comment">-- map values /to/ integers. For instance, we can use the @negative@ predicate</span><span>
</span><span id="line-76"></span><span class="hs-comment">-- on a person's bank balance to work out if they are currently overdrawn:</span><span>
</span><span id="line-77"></span><span class="hs-comment">--</span><span>
</span><span id="line-78"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-79"></span><span class="hs-comment">-- newtype Predicate a = Predicate { getPredicate :: a -&gt; Bool }</span><span>
</span><span id="line-80"></span><span class="hs-comment">--</span><span>
</span><span id="line-81"></span><span class="hs-comment">-- instance Contravariant Predicate where</span><span>
</span><span id="line-82"></span><span class="hs-comment">--   contramap :: (a' -&gt; a) -&gt; (Predicate a -&gt; Predicate a')</span><span>
</span><span id="line-83"></span><span class="hs-comment">--   contramap f (Predicate p) = Predicate (p . f)</span><span>
</span><span id="line-84"></span><span class="hs-comment">--                                          |   `- First, map the input...</span><span>
</span><span id="line-85"></span><span class="hs-comment">--                                          `----- then apply the predicate.</span><span>
</span><span id="line-86"></span><span class="hs-comment">--</span><span>
</span><span id="line-87"></span><span class="hs-comment">-- overdrawn :: Predicate Person</span><span>
</span><span id="line-88"></span><span class="hs-comment">-- overdrawn = contramap personBankBalance negative</span><span>
</span><span id="line-89"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-90"></span><span class="hs-comment">--</span><span>
</span><span id="line-91"></span><span class="hs-comment">-- Any instance should be subject to the following laws:</span><span>
</span><span id="line-92"></span><span class="hs-comment">--</span><span>
</span><span id="line-93"></span><span class="hs-comment">-- [Identity]    @'contramap' 'id'      = 'id'@</span><span>
</span><span id="line-94"></span><span class="hs-comment">-- [Composition] @'contramap' (g . f) = 'contramap' f . 'contramap' g@</span><span>
</span><span id="line-95"></span><span class="hs-comment">--</span><span>
</span><span id="line-96"></span><span class="hs-comment">-- Note, that the second law follows from the free theorem of the type of</span><span>
</span><span id="line-97"></span><span class="hs-comment">-- 'contramap' and the first law, so you need only check that the former</span><span>
</span><span id="line-98"></span><span class="hs-comment">-- condition holds.</span><span>
</span><span id="line-99"></span><span>
</span><span id="line-100"></span><span class="hs-keyword">class</span><span> </span><span id="Contravariant"><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-var">Contravariant</span></a></span></span><span> </span><span id="local-6989586621679583460"><span class="annot"><a href="#local-6989586621679583460"><span class="hs-identifier hs-type">f</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-101"></span><span>  </span><span id="local-6989586621679583454"><span id="local-6989586621679583455"><span id="contramap"><span class="annot"><a href="Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-type">contramap</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679583455"><span class="hs-identifier hs-type">a'</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679583454"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679583460"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583454"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679583460"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583455"><span class="hs-identifier hs-type">a'</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-102"></span><span>
</span><span id="line-103"></span><span>  </span><span class="hs-comment">-- | Replace all locations in the output with the same value.</span><span>
</span><span id="line-104"></span><span>  </span><span class="hs-comment">-- The default definition is @'contramap' . 'const'@, but this may be</span><span>
</span><span id="line-105"></span><span>  </span><span class="hs-comment">-- overridden with a more efficient version.</span><span>
</span><span id="line-106"></span><span>  </span><span id="local-6989586621679583459"><span id="local-6989586621679583461"><span id="%3E%24"><span class="annot"><a href="Data.Functor.Contravariant.html#%3E%24"><span class="hs-operator hs-type">(&gt;$)</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679583461"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679583460"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583461"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679583460"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583459"><span class="hs-identifier hs-type">a</span></a></span></span></span><span>
</span><span id="line-107"></span><span>  </span><span id="local-6989586621679583173"><span class="annot"><a href="Data.Functor.Contravariant.html#%3E%24"><span class="hs-operator hs-var hs-var">(&gt;$)</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; b) -&gt; f b -&gt; f a
forall (f :: * -&gt; *) a' a.
Contravariant f =&gt;
(a' -&gt; a) -&gt; f a -&gt; f a'
</span><a href="Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-var">contramap</span></a></span><span> </span><span class="annot"><span class="annottext">((a -&gt; b) -&gt; f b -&gt; f a) -&gt; (b -&gt; a -&gt; b) -&gt; b -&gt; f b -&gt; f a
forall {k} (cat :: k -&gt; k -&gt; *) (b :: k) (c :: k) (a :: k).
Category cat =&gt;
cat b c -&gt; cat a b -&gt; cat a c
</span><a href="Control.Category.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; a -&gt; b
forall a b. a -&gt; b -&gt; a
</span><a href="GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span></span><span>
</span><span id="line-108"></span><span>
</span><span id="line-109"></span><span class="hs-comment">-- | If @f@ is both 'Functor' and 'Contravariant' then by the time you factor</span><span>
</span><span id="line-110"></span><span class="hs-comment">-- in the laws of each of those classes, it can't actually use its argument in</span><span>
</span><span id="line-111"></span><span class="hs-comment">-- any meaningful capacity.</span><span>
</span><span id="line-112"></span><span class="hs-comment">--</span><span>
</span><span id="line-113"></span><span class="hs-comment">-- This method is surprisingly useful. Where both instances exist and are</span><span>
</span><span id="line-114"></span><span class="hs-comment">-- lawful we have the following laws:</span><span>
</span><span id="line-115"></span><span class="hs-comment">--</span><span>
</span><span id="line-116"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-117"></span><span class="hs-comment">-- 'fmap'      f &#8801; 'phantom'</span><span>
</span><span id="line-118"></span><span class="hs-comment">-- 'contramap' f &#8801; 'phantom'</span><span>
</span><span id="line-119"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-120"></span><span id="local-6989586621679583444"><span id="local-6989586621679583445"><span id="local-6989586621679583446"><span class="annot"><a href="Data.Functor.Contravariant.html#phantom"><span class="hs-identifier hs-type">phantom</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Base.html#Functor"><span class="hs-identifier hs-type">Functor</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583446"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583446"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679583446"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583445"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679583446"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583444"><span class="hs-identifier hs-type">b</span></a></span></span></span></span><span>
</span><span id="line-121"></span><span id="phantom"><span class="annot"><span class="annottext">phantom :: forall (f :: * -&gt; *) a b.
(Functor f, Contravariant f) =&gt;
f a -&gt; f b
</span><a href="Data.Functor.Contravariant.html#phantom"><span class="hs-identifier hs-var hs-var">phantom</span></a></span></span><span> </span><span id="local-6989586621679583163"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679583163"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">() -&gt; f a -&gt; f ()
forall (f :: * -&gt; *) a b. Functor f =&gt; a -&gt; f b -&gt; f a
</span><a href="GHC.Base.html#%3C%24"><span class="hs-operator hs-var">&lt;$</span></a></span><span> </span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679583163"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">f () -&gt; () -&gt; f b
forall (f :: * -&gt; *) b a. Contravariant f =&gt; f b -&gt; b -&gt; f a
</span><a href="Data.Functor.Contravariant.html#%24%3C"><span class="hs-operator hs-var">$&lt;</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-122"></span><span>
</span><span id="line-123"></span><span class="hs-keyword">infixl</span><span> </span><span class="hs-number">4</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#%3E%24"><span class="hs-operator hs-type">&gt;$</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#%24%3C"><span class="hs-operator hs-type">$&lt;</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#%3E%24%3C"><span class="hs-operator hs-type">&gt;$&lt;</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#%3E%24%24%3C"><span class="hs-operator hs-type">&gt;$$&lt;</span></a></span><span>
</span><span id="line-124"></span><span>
</span><span id="line-125"></span><span class="hs-comment">-- | This is '&gt;$' with its arguments flipped.</span><span>
</span><span id="line-126"></span><span id="local-6989586621679583435"><span id="local-6989586621679583436"><span id="local-6989586621679583437"><span class="annot"><a href="Data.Functor.Contravariant.html#%24%3C"><span class="hs-operator hs-type">($&lt;)</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583437"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679583437"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583436"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679583436"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679583437"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583435"><span class="hs-identifier hs-type">a</span></a></span></span></span></span><span>
</span><span id="line-127"></span><span id="%24%3C"><span class="annot"><span class="annottext">$&lt; :: forall (f :: * -&gt; *) b a. Contravariant f =&gt; f b -&gt; b -&gt; f a
</span><a href="Data.Functor.Contravariant.html#%24%3C"><span class="hs-operator hs-var hs-var">($&lt;)</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; f b -&gt; f a) -&gt; f b -&gt; b -&gt; f a
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; f b -&gt; f a
forall (f :: * -&gt; *) b a. Contravariant f =&gt; b -&gt; f b -&gt; f a
</span><a href="Data.Functor.Contravariant.html#%3E%24"><span class="hs-operator hs-var">(&gt;$)</span></a></span><span>
</span><span id="line-128"></span><span>
</span><span id="line-129"></span><span class="hs-comment">-- | This is an infix alias for 'contramap'.</span><span>
</span><span id="line-130"></span><span id="local-6989586621679583426"><span id="local-6989586621679583427"><span id="local-6989586621679583428"><span class="annot"><a href="Data.Functor.Contravariant.html#%3E%24%3C"><span class="hs-operator hs-type">(&gt;$&lt;)</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583428"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679583427"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679583426"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679583428"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583426"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679583428"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583427"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span></span></span><span>
</span><span id="line-131"></span><span id="%3E%24%3C"><span class="annot"><span class="annottext">&gt;$&lt; :: forall (f :: * -&gt; *) a b. Contravariant f =&gt; (a -&gt; b) -&gt; f b -&gt; f a
</span><a href="Data.Functor.Contravariant.html#%3E%24%3C"><span class="hs-operator hs-var hs-var">(&gt;$&lt;)</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; b) -&gt; f b -&gt; f a
forall (f :: * -&gt; *) a' a.
Contravariant f =&gt;
(a' -&gt; a) -&gt; f a -&gt; f a'
</span><a href="Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-var">contramap</span></a></span><span>
</span><span id="line-132"></span><span>
</span><span id="line-133"></span><span class="hs-comment">-- | This is an infix version of 'contramap' with the arguments flipped.</span><span>
</span><span id="line-134"></span><span id="local-6989586621679583420"><span id="local-6989586621679583421"><span id="local-6989586621679583422"><span class="annot"><a href="Data.Functor.Contravariant.html#%3E%24%24%3C"><span class="hs-operator hs-type">(&gt;$$&lt;)</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583422"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679583422"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583421"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679583420"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679583421"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679583422"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583420"><span class="hs-identifier hs-type">a</span></a></span></span></span></span><span>
</span><span id="line-135"></span><span id="%3E%24%24%3C"><span class="annot"><span class="annottext">&gt;$$&lt; :: forall (f :: * -&gt; *) b a. Contravariant f =&gt; f b -&gt; (a -&gt; b) -&gt; f a
</span><a href="Data.Functor.Contravariant.html#%3E%24%24%3C"><span class="hs-operator hs-var hs-var">(&gt;$$&lt;)</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((a -&gt; b) -&gt; f b -&gt; f a) -&gt; f b -&gt; (a -&gt; b) -&gt; f a
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; b) -&gt; f b -&gt; f a
forall (f :: * -&gt; *) a' a.
Contravariant f =&gt;
(a' -&gt; a) -&gt; f a -&gt; f a'
</span><a href="Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-var">contramap</span></a></span><span>
</span><span id="line-136"></span><span>
</span><span id="line-137"></span><span id="local-6989586621679583148"><span id="local-6989586621679583152"><span class="hs-keyword">deriving</span><span> </span><span id="local-6989586621679583410"><span class="annot"><a href="#local-6989586621679583410"><span class="hs-keyword hs-type">newtype</span></a></span></span><span> </span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583410"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Semigroup.Internal.html#Alt"><span class="hs-identifier hs-type">Alt</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583410"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-138"></span><span id="local-6989586621679583137"><span id="local-6989586621679583141"><span class="hs-keyword">deriving</span><span> </span><span id="local-6989586621679583404"><span class="annot"><a href="#local-6989586621679583404"><span class="hs-keyword hs-type">newtype</span></a></span></span><span> </span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583404"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Generics.html#Rec1"><span class="hs-identifier hs-type">Rec1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583404"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-139"></span><span id="local-6989586621679583127"><span id="local-6989586621679583131"><span class="hs-keyword">deriving</span><span> </span><span id="local-6989586621679583393"><span id="local-6989586621679583394"><span id="local-6989586621679583395"><span class="annot"><a href="#local-6989586621679583393"><span class="hs-keyword hs-type hs-type hs-type">newtype</span></a></span></span></span></span><span> </span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583395"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Generics.html#M1"><span class="hs-identifier hs-type">M1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583394"><span class="hs-identifier hs-type">i</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583393"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583395"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-140"></span><span>
</span><span id="line-141"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679583121"><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="annot"><a href="GHC.Generics.html#V1"><span class="hs-identifier hs-type">V1</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-142"></span><span>  </span><span id="local-6989586621679583119"><span id="local-6989586621679583120"><span class="annot"><a href="Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-type">contramap</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679583120"><span class="hs-identifier hs-type">a'</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679583119"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Generics.html#V1"><span class="hs-identifier hs-type">V1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583119"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Generics.html#V1"><span class="hs-identifier hs-type">V1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583120"><span class="hs-identifier hs-type">a'</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-143"></span><span>  </span><span id="local-6989586621679583118"><span class="annot"><span class="annottext">contramap :: forall a' a. (a' -&gt; a) -&gt; V1 a -&gt; V1 a'
</span><a href="#local-6989586621679583118"><span class="hs-identifier hs-var hs-var hs-var hs-var">contramap</span></a></span></span><span> </span><span class="annot"><span class="annottext">a' -&gt; a
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679583117"><span class="annot"><span class="annottext">V1 a
</span><a href="#local-6989586621679583117"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">V1 a
</span><a href="#local-6989586621679583117"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-144"></span><span>
</span><span id="line-145"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679583114"><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="annot"><a href="GHC.Generics.html#U1"><span class="hs-identifier hs-type">U1</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-146"></span><span>  </span><span id="local-6989586621679583112"><span id="local-6989586621679583113"><span class="annot"><a href="Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-type">contramap</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679583113"><span class="hs-identifier hs-type">a'</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679583112"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Generics.html#U1"><span class="hs-identifier hs-type">U1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583112"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Generics.html#U1"><span class="hs-identifier hs-type">U1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583113"><span class="hs-identifier hs-type">a'</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-147"></span><span>  </span><span id="local-6989586621679583111"><span class="annot"><span class="annottext">contramap :: forall a' a. (a' -&gt; a) -&gt; U1 a -&gt; U1 a'
</span><a href="#local-6989586621679583111"><span class="hs-identifier hs-var hs-var hs-var hs-var">contramap</span></a></span></span><span> </span><span class="annot"><span class="annottext">a' -&gt; a
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">U1 a
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">U1 a'
forall k (p :: k). U1 p
</span><a href="GHC.Generics.html#U1"><span class="hs-identifier hs-var">U1</span></a></span><span>
</span><span id="line-148"></span><span>
</span><span id="line-149"></span><span id="local-6989586621679583385"><span id="local-6989586621679583386"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679583107"><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Generics.html#K1"><span class="hs-identifier hs-type">K1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583386"><span class="hs-identifier hs-type">i</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583385"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-150"></span><span>  </span><span id="local-6989586621679583105"><span id="local-6989586621679583106"><span class="annot"><a href="Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-type">contramap</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679583106"><span class="hs-identifier hs-type">a'</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679583105"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Generics.html#K1"><span class="hs-identifier hs-type">K1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583386"><span class="hs-identifier hs-type">i</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583385"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583105"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Generics.html#K1"><span class="hs-identifier hs-type">K1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583386"><span class="hs-identifier hs-type">i</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583385"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583106"><span class="hs-identifier hs-type">a'</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-151"></span><span>  </span><span id="local-6989586621679583104"><span class="annot"><span class="annottext">contramap :: forall a' a. (a' -&gt; a) -&gt; K1 i c a -&gt; K1 i c a'
</span><a href="#local-6989586621679583104"><span class="hs-identifier hs-var hs-var hs-var hs-var">contramap</span></a></span></span><span> </span><span class="annot"><span class="annottext">a' -&gt; a
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Generics.html#K1"><span class="hs-identifier hs-type">K1</span></a></span><span> </span><span id="local-6989586621679583102"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679583102"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">c -&gt; K1 i c a'
forall k i c (p :: k). c -&gt; K1 i c p
</span><a href="GHC.Generics.html#K1"><span class="hs-identifier hs-var">K1</span></a></span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679583102"><span class="hs-identifier hs-var">c</span></a></span></span></span><span>
</span><span id="line-152"></span><span>
</span><span id="line-153"></span><span id="local-6989586621679583377"><span id="local-6989586621679583378"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679583099"><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583378"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583377"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679583378"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="GHC.Generics.html#%3A%2A%3A"><span class="hs-operator hs-type">:*:</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583377"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-154"></span><span>  </span><span id="local-6989586621679583097"><span id="local-6989586621679583098"><span class="annot"><a href="Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-type">contramap</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679583098"><span class="hs-identifier hs-type">a'</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679583097"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679583378"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="GHC.Generics.html#%3A%2A%3A"><span class="hs-operator hs-type">:*:</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583377"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><a href="#local-6989586621679583097"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679583378"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="GHC.Generics.html#%3A%2A%3A"><span class="hs-operator hs-type">:*:</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583377"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><a href="#local-6989586621679583098"><span class="hs-identifier hs-type">a'</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-155"></span><span>  </span><span id="local-6989586621679583094"><span class="annot"><span class="annottext">contramap :: forall a' a. (a' -&gt; a) -&gt; (:*:) f g a -&gt; (:*:) f g a'
</span><a href="#local-6989586621679583094"><span class="hs-identifier hs-var hs-var hs-var hs-var">contramap</span></a></span></span><span> </span><span id="local-6989586621679583093"><span class="annot"><span class="annottext">a' -&gt; a
</span><a href="#local-6989586621679583093"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679583092"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679583092"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="annot"><a href="GHC.Generics.html#%3A%2A%3A"><span class="hs-operator hs-type">:*:</span></a></span><span> </span><span id="local-6989586621679583090"><span class="annot"><span class="annottext">g a
</span><a href="#local-6989586621679583090"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a' -&gt; a) -&gt; f a -&gt; f a'
forall (f :: * -&gt; *) a' a.
Contravariant f =&gt;
(a' -&gt; a) -&gt; f a -&gt; f a'
</span><a href="Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-var">contramap</span></a></span><span> </span><span class="annot"><span class="annottext">a' -&gt; a
</span><a href="#local-6989586621679583093"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679583092"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="annot"><span class="annottext">f a' -&gt; g a' -&gt; (:*:) f g a'
forall k (f :: k -&gt; *) (g :: k -&gt; *) (p :: k).
f p -&gt; g p -&gt; (:*:) f g p
</span><a href="GHC.Generics.html#%3A%2A%3A"><span class="hs-operator hs-var">:*:</span></a></span><span> </span><span class="annot"><span class="annottext">(a' -&gt; a) -&gt; g a -&gt; g a'
forall (f :: * -&gt; *) a' a.
Contravariant f =&gt;
(a' -&gt; a) -&gt; f a -&gt; f a'
</span><a href="Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-var">contramap</span></a></span><span> </span><span class="annot"><span class="annottext">a' -&gt; a
</span><a href="#local-6989586621679583093"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">g a
</span><a href="#local-6989586621679583090"><span class="hs-identifier hs-var">ys</span></a></span></span></span><span>
</span><span id="line-156"></span><span>
</span><span id="line-157"></span><span id="local-6989586621679583369"><span id="local-6989586621679583370"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679583087"><span class="hs-special">(</span><span class="annot"><a href="GHC.Base.html#Functor"><span class="hs-identifier hs-type">Functor</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583370"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583369"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679583370"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="GHC.Generics.html#%3A.%3A"><span class="hs-operator hs-type">:.:</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583369"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-158"></span><span>  </span><span id="local-6989586621679583085"><span id="local-6989586621679583086"><span class="annot"><a href="Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-type">contramap</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679583086"><span class="hs-identifier hs-type">a'</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679583085"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679583370"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="GHC.Generics.html#%3A.%3A"><span class="hs-operator hs-type">:.:</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583369"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><a href="#local-6989586621679583085"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679583370"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="GHC.Generics.html#%3A.%3A"><span class="hs-operator hs-type">:.:</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583369"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><a href="#local-6989586621679583086"><span class="hs-identifier hs-type">a'</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-159"></span><span>  </span><span id="local-6989586621679583082"><span class="annot"><span class="annottext">contramap :: forall a' a. (a' -&gt; a) -&gt; (:.:) f g a -&gt; (:.:) f g a'
</span><a href="#local-6989586621679583082"><span class="hs-identifier hs-var hs-var hs-var hs-var">contramap</span></a></span></span><span> </span><span id="local-6989586621679583081"><span class="annot"><span class="annottext">a' -&gt; a
</span><a href="#local-6989586621679583081"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Generics.html#Comp1"><span class="hs-identifier hs-type">Comp1</span></a></span><span> </span><span id="local-6989586621679583079"><span class="annot"><span class="annottext">f (g a)
</span><a href="#local-6989586621679583079"><span class="hs-identifier hs-var">fg</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">f (g a') -&gt; (:.:) f g a'
forall k2 k1 (f :: k2 -&gt; *) (g :: k1 -&gt; k2) (p :: k1).
f (g p) -&gt; (:.:) f g p
</span><a href="GHC.Generics.html#Comp1"><span class="hs-identifier hs-var">Comp1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(g a -&gt; g a') -&gt; f (g a) -&gt; f (g a')
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a' -&gt; a) -&gt; g a -&gt; g a'
forall (f :: * -&gt; *) a' a.
Contravariant f =&gt;
(a' -&gt; a) -&gt; f a -&gt; f a'
</span><a href="Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-var">contramap</span></a></span><span> </span><span class="annot"><span class="annottext">a' -&gt; a
</span><a href="#local-6989586621679583081"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">f (g a)
</span><a href="#local-6989586621679583079"><span class="hs-identifier hs-var">fg</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-160"></span><span>
</span><span id="line-161"></span><span id="local-6989586621679583358"><span id="local-6989586621679583359"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679583076"><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583359"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583358"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679583359"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="GHC.Generics.html#%3A%2B%3A"><span class="hs-operator hs-type">:+:</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583358"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-162"></span><span>  </span><span id="local-6989586621679583074"><span id="local-6989586621679583075"><span class="annot"><a href="Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-type">contramap</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679583075"><span class="hs-identifier hs-type">a'</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679583074"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679583359"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="GHC.Generics.html#%3A%2B%3A"><span class="hs-operator hs-type">:+:</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583358"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><a href="#local-6989586621679583074"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679583359"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="GHC.Generics.html#%3A%2B%3A"><span class="hs-operator hs-type">:+:</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583358"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><a href="#local-6989586621679583075"><span class="hs-identifier hs-type">a'</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-163"></span><span>  </span><span id="local-6989586621679583071"><span class="annot"><span class="annottext">contramap :: forall a' a. (a' -&gt; a) -&gt; (:+:) f g a -&gt; (:+:) f g a'
</span><a href="#local-6989586621679583071"><span class="hs-identifier hs-var hs-var hs-var hs-var">contramap</span></a></span></span><span> </span><span id="local-6989586621679583070"><span class="annot"><span class="annottext">a' -&gt; a
</span><a href="#local-6989586621679583070"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Generics.html#L1"><span class="hs-identifier hs-type">L1</span></a></span><span> </span><span id="local-6989586621679583068"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679583068"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">f a' -&gt; (:+:) f g a'
forall k (f :: k -&gt; *) (g :: k -&gt; *) (p :: k). f p -&gt; (:+:) f g p
</span><a href="GHC.Generics.html#L1"><span class="hs-identifier hs-var">L1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a' -&gt; a) -&gt; f a -&gt; f a'
forall (f :: * -&gt; *) a' a.
Contravariant f =&gt;
(a' -&gt; a) -&gt; f a -&gt; f a'
</span><a href="Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-var">contramap</span></a></span><span> </span><span class="annot"><span class="annottext">a' -&gt; a
</span><a href="#local-6989586621679583070"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679583068"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-164"></span><span>  </span><span class="annot"><a href="Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-var">contramap</span></a></span><span> </span><span id="local-6989586621679583067"><span class="annot"><span class="annottext">a' -&gt; a
</span><a href="#local-6989586621679583067"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Generics.html#R1"><span class="hs-identifier hs-type">R1</span></a></span><span> </span><span id="local-6989586621679583065"><span class="annot"><span class="annottext">g a
</span><a href="#local-6989586621679583065"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">g a' -&gt; (:+:) f g a'
forall k (f :: k -&gt; *) (g :: k -&gt; *) (p :: k). g p -&gt; (:+:) f g p
</span><a href="GHC.Generics.html#R1"><span class="hs-identifier hs-var">R1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a' -&gt; a) -&gt; g a -&gt; g a'
forall (f :: * -&gt; *) a' a.
Contravariant f =&gt;
(a' -&gt; a) -&gt; f a -&gt; f a'
</span><a href="Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-var">contramap</span></a></span><span> </span><span class="annot"><span class="annottext">a' -&gt; a
</span><a href="#local-6989586621679583067"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">g a
</span><a href="#local-6989586621679583065"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-165"></span><span>
</span><span id="line-166"></span><span id="local-6989586621679583350"><span id="local-6989586621679583351"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679583062"><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583351"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583350"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#Sum"><span class="hs-identifier hs-type">Sum</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583351"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583350"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-167"></span><span>  </span><span id="local-6989586621679583060"><span id="local-6989586621679583061"><span class="annot"><a href="Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-type">contramap</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679583061"><span class="hs-identifier hs-type">a'</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679583060"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#Sum"><span class="hs-identifier hs-type">Sum</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583351"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583350"><span class="hs-identifier hs-type">g</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583060"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Functor.Sum.html#Sum"><span class="hs-identifier hs-type">Sum</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583351"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583350"><span class="hs-identifier hs-type">g</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583061"><span class="hs-identifier hs-type">a'</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-168"></span><span>  </span><span id="local-6989586621679583057"><span class="annot"><span class="annottext">contramap :: forall a' a. (a' -&gt; a) -&gt; Sum f g a -&gt; Sum f g a'
</span><a href="#local-6989586621679583057"><span class="hs-identifier hs-var hs-var hs-var hs-var">contramap</span></a></span></span><span> </span><span id="local-6989586621679583056"><span class="annot"><span class="annottext">a' -&gt; a
</span><a href="#local-6989586621679583056"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#InL"><span class="hs-identifier hs-type">InL</span></a></span><span> </span><span id="local-6989586621679583054"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679583054"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">f a' -&gt; Sum f g a'
forall {k} (f :: k -&gt; *) (g :: k -&gt; *) (a :: k). f a -&gt; Sum f g a
</span><a href="Data.Functor.Sum.html#InL"><span class="hs-identifier hs-var">InL</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a' -&gt; a) -&gt; f a -&gt; f a'
forall (f :: * -&gt; *) a' a.
Contravariant f =&gt;
(a' -&gt; a) -&gt; f a -&gt; f a'
</span><a href="Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-var">contramap</span></a></span><span> </span><span class="annot"><span class="annottext">a' -&gt; a
</span><a href="#local-6989586621679583056"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679583054"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-169"></span><span>  </span><span class="annot"><a href="Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-var">contramap</span></a></span><span> </span><span id="local-6989586621679583053"><span class="annot"><span class="annottext">a' -&gt; a
</span><a href="#local-6989586621679583053"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#InR"><span class="hs-identifier hs-type">InR</span></a></span><span> </span><span id="local-6989586621679583051"><span class="annot"><span class="annottext">g a
</span><a href="#local-6989586621679583051"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">g a' -&gt; Sum f g a'
forall {k} (f :: k -&gt; *) (g :: k -&gt; *) (a :: k). g a -&gt; Sum f g a
</span><a href="Data.Functor.Sum.html#InR"><span class="hs-identifier hs-var">InR</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a' -&gt; a) -&gt; g a -&gt; g a'
forall (f :: * -&gt; *) a' a.
Contravariant f =&gt;
(a' -&gt; a) -&gt; f a -&gt; f a'
</span><a href="Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-var">contramap</span></a></span><span> </span><span class="annot"><span class="annottext">a' -&gt; a
</span><a href="#local-6989586621679583053"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">g a
</span><a href="#local-6989586621679583051"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-170"></span><span>
</span><span id="line-171"></span><span id="local-6989586621679583342"><span id="local-6989586621679583343"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679583048"><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583343"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583342"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-172"></span><span>      </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Product.html#Product"><span class="hs-identifier hs-type">Product</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583343"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583342"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-173"></span><span>  </span><span id="local-6989586621679583046"><span id="local-6989586621679583047"><span class="annot"><a href="Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-type">contramap</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679583047"><span class="hs-identifier hs-type">a'</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679583046"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Product.html#Product"><span class="hs-identifier hs-type">Product</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583343"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583342"><span class="hs-identifier hs-type">g</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583046"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Functor.Product.html#Product"><span class="hs-identifier hs-type">Product</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583343"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583342"><span class="hs-identifier hs-type">g</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583047"><span class="hs-identifier hs-type">a'</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-174"></span><span>  </span><span id="local-6989586621679583043"><span class="annot"><span class="annottext">contramap :: forall a' a. (a' -&gt; a) -&gt; Product f g a -&gt; Product f g a'
</span><a href="#local-6989586621679583043"><span class="hs-identifier hs-var hs-var hs-var hs-var">contramap</span></a></span></span><span> </span><span id="local-6989586621679583042"><span class="annot"><span class="annottext">a' -&gt; a
</span><a href="#local-6989586621679583042"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Product.html#Pair"><span class="hs-identifier hs-type">Pair</span></a></span><span> </span><span id="local-6989586621679583040"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679583040"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679583039"><span class="annot"><span class="annottext">g a
</span><a href="#local-6989586621679583039"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">f a' -&gt; g a' -&gt; Product f g a'
forall {k} (f :: k -&gt; *) (g :: k -&gt; *) (a :: k).
f a -&gt; g a -&gt; Product f g a
</span><a href="Data.Functor.Product.html#Pair"><span class="hs-identifier hs-var">Pair</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a' -&gt; a) -&gt; f a -&gt; f a'
forall (f :: * -&gt; *) a' a.
Contravariant f =&gt;
(a' -&gt; a) -&gt; f a -&gt; f a'
</span><a href="Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-var">contramap</span></a></span><span> </span><span class="annot"><span class="annottext">a' -&gt; a
</span><a href="#local-6989586621679583042"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679583040"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a' -&gt; a) -&gt; g a -&gt; g a'
forall (f :: * -&gt; *) a' a.
Contravariant f =&gt;
(a' -&gt; a) -&gt; f a -&gt; f a'
</span><a href="Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-var">contramap</span></a></span><span> </span><span class="annot"><span class="annottext">a' -&gt; a
</span><a href="#local-6989586621679583042"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">g a
</span><a href="#local-6989586621679583039"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-175"></span><span>
</span><span id="line-176"></span><span id="local-6989586621679583335"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679583036"><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Const.html#Const"><span class="hs-identifier hs-type">Const</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583335"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-177"></span><span>  </span><span id="local-6989586621679583034"><span id="local-6989586621679583035"><span class="annot"><a href="Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-type">contramap</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679583035"><span class="hs-identifier hs-type">b'</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679583034"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Const.html#Const"><span class="hs-identifier hs-type">Const</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583335"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583034"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Functor.Const.html#Const"><span class="hs-identifier hs-type">Const</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583335"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583035"><span class="hs-identifier hs-type">b'</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-178"></span><span>  </span><span id="local-6989586621679583033"><span class="annot"><span class="annottext">contramap :: forall a' a. (a' -&gt; a) -&gt; Const a a -&gt; Const a a'
</span><a href="#local-6989586621679583033"><span class="hs-identifier hs-var hs-var hs-var hs-var">contramap</span></a></span></span><span> </span><span class="annot"><span class="annottext">b' -&gt; b
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Const.html#Const"><span class="hs-identifier hs-type">Const</span></a></span><span> </span><span id="local-6989586621679583031"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679583031"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Const a b'
forall {k} a (b :: k). a -&gt; Const a b
</span><a href="Data.Functor.Const.html#Const"><span class="hs-identifier hs-var">Const</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679583031"><span class="hs-identifier hs-var">a</span></a></span></span><span>
</span><span id="line-179"></span><span>
</span><span id="line-180"></span><span id="local-6989586621679583328"><span id="local-6989586621679583329"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679583028"><span class="hs-special">(</span><span class="annot"><a href="GHC.Base.html#Functor"><span class="hs-identifier hs-type">Functor</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583329"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583328"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Compose.html#Compose"><span class="hs-identifier hs-type">Compose</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583329"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583328"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-181"></span><span>  </span><span id="local-6989586621679583026"><span id="local-6989586621679583027"><span class="annot"><a href="Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-type">contramap</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679583027"><span class="hs-identifier hs-type">a'</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679583026"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Compose.html#Compose"><span class="hs-identifier hs-type">Compose</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583329"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583328"><span class="hs-identifier hs-type">g</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583026"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Functor.Compose.html#Compose"><span class="hs-identifier hs-type">Compose</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583329"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583328"><span class="hs-identifier hs-type">g</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583027"><span class="hs-identifier hs-type">a'</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-182"></span><span>  </span><span id="local-6989586621679583023"><span class="annot"><span class="annottext">contramap :: forall a' a. (a' -&gt; a) -&gt; Compose f g a -&gt; Compose f g a'
</span><a href="#local-6989586621679583023"><span class="hs-identifier hs-var hs-var hs-var hs-var">contramap</span></a></span></span><span> </span><span id="local-6989586621679583022"><span class="annot"><span class="annottext">a' -&gt; a
</span><a href="#local-6989586621679583022"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Compose.html#Compose"><span class="hs-identifier hs-type">Compose</span></a></span><span> </span><span id="local-6989586621679583020"><span class="annot"><span class="annottext">f (g a)
</span><a href="#local-6989586621679583020"><span class="hs-identifier hs-var">fga</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">f (g a') -&gt; Compose f g a'
forall {k} {k} (f :: k -&gt; *) (g :: k -&gt; k) (a :: k).
f (g a) -&gt; Compose f g a
</span><a href="Data.Functor.Compose.html#Compose"><span class="hs-identifier hs-var">Compose</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(g a -&gt; g a') -&gt; f (g a) -&gt; f (g a')
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a' -&gt; a) -&gt; g a -&gt; g a'
forall (f :: * -&gt; *) a' a.
Contravariant f =&gt;
(a' -&gt; a) -&gt; f a -&gt; f a'
</span><a href="Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-var">contramap</span></a></span><span> </span><span class="annot"><span class="annottext">a' -&gt; a
</span><a href="#local-6989586621679583022"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">f (g a)
</span><a href="#local-6989586621679583020"><span class="hs-identifier hs-var">fga</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-183"></span><span>
</span><span id="line-184"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679583017"><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="annot"><a href="Data.Proxy.html#Proxy"><span class="hs-identifier hs-type">Proxy</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-185"></span><span>  </span><span id="local-6989586621679583015"><span id="local-6989586621679583016"><span class="annot"><a href="Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-type">contramap</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679583016"><span class="hs-identifier hs-type">a'</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679583015"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Proxy.html#Proxy"><span class="hs-identifier hs-type">Proxy</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583015"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Proxy.html#Proxy"><span class="hs-identifier hs-type">Proxy</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583016"><span class="hs-identifier hs-type">a'</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-186"></span><span>  </span><span id="local-6989586621679583014"><span class="annot"><span class="annottext">contramap :: forall a' a. (a' -&gt; a) -&gt; Proxy a -&gt; Proxy a'
</span><a href="#local-6989586621679583014"><span class="hs-identifier hs-var hs-var hs-var hs-var">contramap</span></a></span></span><span> </span><span class="annot"><span class="annottext">a' -&gt; a
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Proxy a
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Proxy a'
forall {k} (t :: k). Proxy t
</span><a href="Data.Proxy.html#Proxy"><span class="hs-identifier hs-var">Proxy</span></a></span><span>
</span><span id="line-187"></span><span>
</span><span id="line-188"></span><span class="hs-keyword">newtype</span><span> </span><span id="Predicate"><span class="annot"><a href="Data.Functor.Contravariant.html#Predicate"><span class="hs-identifier hs-var">Predicate</span></a></span></span><span> </span><span id="local-6989586621679583316"><span class="annot"><a href="#local-6989586621679583316"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Predicate"><span class="annot"><a href="Data.Functor.Contravariant.html#Predicate"><span class="hs-identifier hs-var">Predicate</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="getPredicate"><span class="annot"><span class="annottext">forall a. Predicate a -&gt; a -&gt; Bool
</span><a href="Data.Functor.Contravariant.html#getPredicate"><span class="hs-identifier hs-var hs-var">getPredicate</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679583316"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-189"></span><span>  </span><span class="hs-keyword">deriving</span><span>
</span><span id="line-190"></span><span>    </span><span class="hs-special">(</span><span> </span><span class="hs-comment">-- | @('&lt;&gt;')@ on predicates uses logical conjunction @('&amp;&amp;')@ on</span><span>
</span><span id="line-191"></span><span>      </span><span class="hs-comment">-- the results. Without newtypes this equals @'liftA2' (&amp;&amp;)@.</span><span>
</span><span id="line-192"></span><span>      </span><span class="hs-comment">--</span><span>
</span><span id="line-193"></span><span>      </span><span class="hs-comment">-- @</span><span>
</span><span id="line-194"></span><span>      </span><span class="hs-comment">-- (&lt;&gt;) :: Predicate a -&gt; Predicate a -&gt; Predicate a</span><span>
</span><span id="line-195"></span><span>      </span><span class="hs-comment">-- Predicate pred &lt;&gt; Predicate pred' = Predicate \a -&gt;</span><span>
</span><span id="line-196"></span><span>      </span><span class="hs-comment">--   pred a &amp;&amp; pred' a</span><span>
</span><span id="line-197"></span><span>      </span><span class="hs-comment">-- @</span><span>
</span><span id="line-198"></span><span>      </span><span id="local-6989586621679582996"><span id="local-6989586621679583003"><span id="local-6989586621679583009"><span class="annot"><span class="annottext">NonEmpty (Predicate a) -&gt; Predicate a
Predicate a -&gt; Predicate a -&gt; Predicate a
(Predicate a -&gt; Predicate a -&gt; Predicate a)
-&gt; (NonEmpty (Predicate a) -&gt; Predicate a)
-&gt; (forall b. Integral b =&gt; b -&gt; Predicate a -&gt; Predicate a)
-&gt; Semigroup (Predicate a)
forall b. Integral b =&gt; b -&gt; Predicate a -&gt; Predicate a
forall a. NonEmpty (Predicate a) -&gt; Predicate a
forall a. Predicate a -&gt; Predicate a -&gt; Predicate a
forall a.
(a -&gt; a -&gt; a)
-&gt; (NonEmpty a -&gt; a)
-&gt; (forall b. Integral b =&gt; b -&gt; a -&gt; a)
-&gt; Semigroup a
forall a b. Integral b =&gt; b -&gt; Predicate a -&gt; Predicate a
stimes :: forall b. Integral b =&gt; b -&gt; Predicate a -&gt; Predicate a
$cstimes :: forall a b. Integral b =&gt; b -&gt; Predicate a -&gt; Predicate a
sconcat :: NonEmpty (Predicate a) -&gt; Predicate a
$csconcat :: forall a. NonEmpty (Predicate a) -&gt; Predicate a
&lt;&gt; :: Predicate a -&gt; Predicate a -&gt; Predicate a
$c&lt;&gt; :: forall a. Predicate a -&gt; Predicate a -&gt; Predicate a
</span><a href="GHC.Base.html#Semigroup"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Semigroup</span></a></span></span></span></span><span>
</span><span id="line-199"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="hs-comment">-- | @'mempty'@ on predicates always returns @True@. Without</span><span>
</span><span id="line-200"></span><span>      </span><span class="hs-comment">-- newtypes this equals @'pure' True@.</span><span>
</span><span id="line-201"></span><span>      </span><span class="hs-comment">--</span><span>
</span><span id="line-202"></span><span>      </span><span class="hs-comment">-- @</span><span>
</span><span id="line-203"></span><span>      </span><span class="hs-comment">-- mempty :: Predicate a</span><span>
</span><span id="line-204"></span><span>      </span><span class="hs-comment">-- mempty = \_ -&gt; True</span><span>
</span><span id="line-205"></span><span>      </span><span class="hs-comment">-- @</span><span>
</span><span id="line-206"></span><span>      </span><span id="local-6989586621679582973"><span id="local-6989586621679582978"><span id="local-6989586621679582984"><span class="annot"><span class="annottext">Semigroup (Predicate a)
Predicate a
Semigroup (Predicate a)
-&gt; Predicate a
-&gt; (Predicate a -&gt; Predicate a -&gt; Predicate a)
-&gt; ([Predicate a] -&gt; Predicate a)
-&gt; Monoid (Predicate a)
[Predicate a] -&gt; Predicate a
Predicate a -&gt; Predicate a -&gt; Predicate a
forall a. Semigroup (Predicate a)
forall a. Predicate a
forall a.
Semigroup a -&gt; a -&gt; (a -&gt; a -&gt; a) -&gt; ([a] -&gt; a) -&gt; Monoid a
forall a. [Predicate a] -&gt; Predicate a
forall a. Predicate a -&gt; Predicate a -&gt; Predicate a
mconcat :: [Predicate a] -&gt; Predicate a
$cmconcat :: forall a. [Predicate a] -&gt; Predicate a
mappend :: Predicate a -&gt; Predicate a -&gt; Predicate a
$cmappend :: forall a. Predicate a -&gt; Predicate a -&gt; Predicate a
mempty :: Predicate a
$cmempty :: forall a. Predicate a
</span><a href="GHC.Base.html#Monoid"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Monoid</span></a></span></span></span></span><span>
</span><span id="line-207"></span><span>    </span><span class="hs-special">)</span><span>
</span><span id="line-208"></span><span>  </span><span class="hs-keyword">via</span><span> </span><span class="annot"><a href="#local-6989586621679583316"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Semigroup.Internal.html#All"><span class="hs-identifier hs-type">All</span></a></span><span>
</span><span id="line-209"></span><span>
</span><span id="line-210"></span><span>  </span><span class="hs-keyword">deriving</span><span>
</span><span id="line-211"></span><span>    </span><span class="hs-special">(</span><span> </span><span class="hs-comment">-- | A 'Predicate' is a 'Contravariant' 'Functor', because</span><span>
</span><span id="line-212"></span><span>      </span><span class="hs-comment">-- 'contramap' can apply its function argument to the input of</span><span>
</span><span id="line-213"></span><span>      </span><span class="hs-comment">-- the predicate.</span><span>
</span><span id="line-214"></span><span>      </span><span class="hs-comment">--</span><span>
</span><span id="line-215"></span><span>      </span><span class="hs-comment">-- Without newtypes @'contramap' f@ equals precomposing with @f@</span><span>
</span><span id="line-216"></span><span>      </span><span class="hs-comment">-- (= @(. f)@).</span><span>
</span><span id="line-217"></span><span>      </span><span class="hs-comment">--</span><span>
</span><span id="line-218"></span><span>      </span><span class="hs-comment">-- @</span><span>
</span><span id="line-219"></span><span>      </span><span class="hs-comment">-- contramap :: (a' -&gt; a) -&gt; (Predicate a -&gt; Predicate a')</span><span>
</span><span id="line-220"></span><span>      </span><span class="hs-comment">-- contramap f (Predicate g) = Predicate (g . f)</span><span>
</span><span id="line-221"></span><span>      </span><span class="hs-comment">-- @</span><span>
</span><span id="line-222"></span><span>      </span><span id="local-6989586621679582961"><span id="local-6989586621679582965"><span class="annot"><span class="annottext">(forall a' a. (a' -&gt; a) -&gt; Predicate a -&gt; Predicate a')
-&gt; (forall b a. b -&gt; Predicate b -&gt; Predicate a)
-&gt; Contravariant Predicate
forall b a. b -&gt; Predicate b -&gt; Predicate a
forall a' a. (a' -&gt; a) -&gt; Predicate a -&gt; Predicate a'
forall (f :: * -&gt; *).
(forall a' a. (a' -&gt; a) -&gt; f a -&gt; f a')
-&gt; (forall b a. b -&gt; f b -&gt; f a) -&gt; Contravariant f
&gt;$ :: forall b a. b -&gt; Predicate b -&gt; Predicate a
$c&gt;$ :: forall b a. b -&gt; Predicate b -&gt; Predicate a
contramap :: forall a' a. (a' -&gt; a) -&gt; Predicate a -&gt; Predicate a'
$ccontramap :: forall a' a. (a' -&gt; a) -&gt; Predicate a -&gt; Predicate a'
</span><a href="#local-6989586621679582961"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Contravariant</span></a></span></span></span><span>
</span><span id="line-223"></span><span>    </span><span class="hs-special">)</span><span>
</span><span id="line-224"></span><span>  </span><span class="hs-keyword">via</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-225"></span><span>
</span><span id="line-226"></span><span class="hs-comment">-- | Defines a total ordering on a type as per 'compare'.</span><span>
</span><span id="line-227"></span><span class="hs-comment">--</span><span>
</span><span id="line-228"></span><span class="hs-comment">-- This condition is not checked by the types. You must ensure that the</span><span>
</span><span id="line-229"></span><span class="hs-comment">-- supplied values are valid total orderings yourself.</span><span>
</span><span id="line-230"></span><span class="hs-keyword">newtype</span><span> </span><span id="Comparison"><span class="annot"><a href="Data.Functor.Contravariant.html#Comparison"><span class="hs-identifier hs-var">Comparison</span></a></span></span><span> </span><span id="local-6989586621679583295"><span class="annot"><a href="#local-6989586621679583295"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Comparison"><span class="annot"><a href="Data.Functor.Contravariant.html#Comparison"><span class="hs-identifier hs-var">Comparison</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="getComparison"><span class="annot"><span class="annottext">forall a. Comparison a -&gt; a -&gt; a -&gt; Ordering
</span><a href="Data.Functor.Contravariant.html#getComparison"><span class="hs-identifier hs-var hs-var">getComparison</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679583295"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679583295"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Ordering"><span class="hs-identifier hs-type">Ordering</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-231"></span><span>  </span><span class="hs-keyword">deriving</span><span>
</span><span id="line-232"></span><span>  </span><span class="annot"><span class="hs-keyword">newtype</span></span><span>
</span><span id="line-233"></span><span>    </span><span class="hs-special">(</span><span> </span><span class="hs-comment">-- | @('&lt;&gt;')@ on comparisons combines results with @('&lt;&gt;')</span><span>
</span><span id="line-234"></span><span>      </span><span class="hs-comment">-- \@Ordering@. Without newtypes this equals @'liftA2' ('liftA2'</span><span>
</span><span id="line-235"></span><span>      </span><span class="hs-comment">-- ('&lt;&gt;'))@.</span><span>
</span><span id="line-236"></span><span>      </span><span class="hs-comment">--</span><span>
</span><span id="line-237"></span><span>      </span><span class="hs-comment">-- @</span><span>
</span><span id="line-238"></span><span>      </span><span class="hs-comment">-- (&lt;&gt;) :: Comparison a -&gt; Comparison a -&gt; Comparison a</span><span>
</span><span id="line-239"></span><span>      </span><span class="hs-comment">-- Comparison cmp &lt;&gt; Comparison cmp' = Comparison \a a' -&gt;</span><span>
</span><span id="line-240"></span><span>      </span><span class="hs-comment">--   cmp a a' &lt;&gt; cmp a a'</span><span>
</span><span id="line-241"></span><span>      </span><span class="hs-comment">-- @</span><span>
</span><span id="line-242"></span><span>      </span><span id="local-6989586621679582942"><span id="local-6989586621679582949"><span id="local-6989586621679582954"><span class="annot"><span class="annottext">NonEmpty (Comparison a) -&gt; Comparison a
Comparison a -&gt; Comparison a -&gt; Comparison a
(Comparison a -&gt; Comparison a -&gt; Comparison a)
-&gt; (NonEmpty (Comparison a) -&gt; Comparison a)
-&gt; (forall b. Integral b =&gt; b -&gt; Comparison a -&gt; Comparison a)
-&gt; Semigroup (Comparison a)
forall b. Integral b =&gt; b -&gt; Comparison a -&gt; Comparison a
forall a. NonEmpty (Comparison a) -&gt; Comparison a
forall a. Comparison a -&gt; Comparison a -&gt; Comparison a
forall a.
(a -&gt; a -&gt; a)
-&gt; (NonEmpty a -&gt; a)
-&gt; (forall b. Integral b =&gt; b -&gt; a -&gt; a)
-&gt; Semigroup a
forall a b. Integral b =&gt; b -&gt; Comparison a -&gt; Comparison a
stimes :: forall b. Integral b =&gt; b -&gt; Comparison a -&gt; Comparison a
$cstimes :: forall a b. Integral b =&gt; b -&gt; Comparison a -&gt; Comparison a
sconcat :: NonEmpty (Comparison a) -&gt; Comparison a
$csconcat :: forall a. NonEmpty (Comparison a) -&gt; Comparison a
&lt;&gt; :: Comparison a -&gt; Comparison a -&gt; Comparison a
$c&lt;&gt; :: forall a. Comparison a -&gt; Comparison a -&gt; Comparison a
</span><a href="GHC.Base.html#Semigroup"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Semigroup</span></a></span></span></span></span><span>
</span><span id="line-243"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="hs-comment">-- | @'mempty'@ on comparisons always returns @EQ@. Without</span><span>
</span><span id="line-244"></span><span>      </span><span class="hs-comment">-- newtypes this equals @'pure' ('pure' EQ)@.</span><span>
</span><span id="line-245"></span><span>      </span><span class="hs-comment">--</span><span>
</span><span id="line-246"></span><span>      </span><span class="hs-comment">-- @</span><span>
</span><span id="line-247"></span><span>      </span><span class="hs-comment">-- mempty :: Comparison a</span><span>
</span><span id="line-248"></span><span>      </span><span class="hs-comment">-- mempty = Comparison \_ _ -&gt; EQ</span><span>
</span><span id="line-249"></span><span>      </span><span class="hs-comment">-- @</span><span>
</span><span id="line-250"></span><span>      </span><span id="local-6989586621679582918"><span id="local-6989586621679582923"><span id="local-6989586621679582928"><span class="annot"><span class="annottext">Semigroup (Comparison a)
Comparison a
Semigroup (Comparison a)
-&gt; Comparison a
-&gt; (Comparison a -&gt; Comparison a -&gt; Comparison a)
-&gt; ([Comparison a] -&gt; Comparison a)
-&gt; Monoid (Comparison a)
[Comparison a] -&gt; Comparison a
Comparison a -&gt; Comparison a -&gt; Comparison a
forall a. Semigroup (Comparison a)
forall a. Comparison a
forall a.
Semigroup a -&gt; a -&gt; (a -&gt; a -&gt; a) -&gt; ([a] -&gt; a) -&gt; Monoid a
forall a. [Comparison a] -&gt; Comparison a
forall a. Comparison a -&gt; Comparison a -&gt; Comparison a
mconcat :: [Comparison a] -&gt; Comparison a
$cmconcat :: forall a. [Comparison a] -&gt; Comparison a
mappend :: Comparison a -&gt; Comparison a -&gt; Comparison a
$cmappend :: forall a. Comparison a -&gt; Comparison a -&gt; Comparison a
mempty :: Comparison a
$cmempty :: forall a. Comparison a
</span><a href="GHC.Base.html#Monoid"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Monoid</span></a></span></span></span></span><span>
</span><span id="line-251"></span><span>    </span><span class="hs-special">)</span><span>
</span><span id="line-252"></span><span>
</span><span id="line-253"></span><span class="hs-comment">-- | A 'Comparison' is a 'Contravariant' 'Functor', because 'contramap' can</span><span>
</span><span id="line-254"></span><span class="hs-comment">-- apply its function argument to each input of the comparison function.</span><span>
</span><span id="line-255"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679582907"><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Comparison"><span class="hs-identifier hs-type">Comparison</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-256"></span><span>  </span><span id="local-6989586621679582905"><span id="local-6989586621679582906"><span class="annot"><a href="Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-type">contramap</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679582906"><span class="hs-identifier hs-type">a'</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679582905"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Comparison"><span class="hs-identifier hs-type">Comparison</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679582905"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Comparison"><span class="hs-identifier hs-type">Comparison</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679582906"><span class="hs-identifier hs-type">a'</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-257"></span><span>  </span><span id="local-6989586621679582904"><span class="annot"><span class="annottext">contramap :: forall a' a. (a' -&gt; a) -&gt; Comparison a -&gt; Comparison a'
</span><a href="#local-6989586621679582904"><span class="hs-identifier hs-var hs-var hs-var hs-var">contramap</span></a></span></span><span> </span><span id="local-6989586621679582903"><span class="annot"><span class="annottext">a' -&gt; a
</span><a href="#local-6989586621679582903"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Comparison"><span class="hs-identifier hs-type">Comparison</span></a></span><span> </span><span id="local-6989586621679582902"><span class="annot"><span class="annottext">a -&gt; a -&gt; Ordering
</span><a href="#local-6989586621679582902"><span class="hs-identifier hs-var">g</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a' -&gt; a' -&gt; Ordering) -&gt; Comparison a'
forall a. (a -&gt; a -&gt; Ordering) -&gt; Comparison a
</span><a href="Data.Functor.Contravariant.html#Comparison"><span class="hs-identifier hs-var">Comparison</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; a -&gt; Ordering) -&gt; (a' -&gt; a) -&gt; a' -&gt; a' -&gt; Ordering
forall b c a. (b -&gt; b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; a -&gt; c
</span><a href="Data.Function.html#on"><span class="hs-identifier hs-var">on</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Ordering
</span><a href="#local-6989586621679582902"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">a' -&gt; a
</span><a href="#local-6989586621679582903"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-258"></span><span>
</span><span id="line-259"></span><span class="hs-comment">-- | Compare using 'compare'.</span><span>
</span><span id="line-260"></span><span id="local-6989586621679583284"><span class="annot"><a href="Data.Functor.Contravariant.html#defaultComparison"><span class="hs-identifier hs-type">defaultComparison</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Ord"><span class="hs-identifier hs-type">Ord</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583284"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Comparison"><span class="hs-identifier hs-type">Comparison</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583284"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-261"></span><span id="defaultComparison"><span class="annot"><span class="annottext">defaultComparison :: forall a. Ord a =&gt; Comparison a
</span><a href="Data.Functor.Contravariant.html#defaultComparison"><span class="hs-identifier hs-var hs-var">defaultComparison</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; a -&gt; Ordering) -&gt; Comparison a
forall a. (a -&gt; a -&gt; Ordering) -&gt; Comparison a
</span><a href="Data.Functor.Contravariant.html#Comparison"><span class="hs-identifier hs-var">Comparison</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><a href="../../ghc-prim/src/GHC.Classes.html#compare"><span class="hs-identifier hs-var">compare</span></a></span><span>
</span><span id="line-262"></span><span>
</span><span id="line-263"></span><span class="hs-comment">-- | This data type represents an equivalence relation.</span><span>
</span><span id="line-264"></span><span class="hs-comment">--</span><span>
</span><span id="line-265"></span><span class="hs-comment">-- Equivalence relations are expected to satisfy three laws:</span><span>
</span><span id="line-266"></span><span class="hs-comment">--</span><span>
</span><span id="line-267"></span><span class="hs-comment">-- [Reflexivity]:  @'getEquivalence' f a a = True@</span><span>
</span><span id="line-268"></span><span class="hs-comment">-- [Symmetry]:     @'getEquivalence' f a b = 'getEquivalence' f b a@</span><span>
</span><span id="line-269"></span><span class="hs-comment">-- [Transitivity]:</span><span>
</span><span id="line-270"></span><span class="hs-comment">--    If @'getEquivalence' f a b@ and @'getEquivalence' f b c@ are both 'True'</span><span>
</span><span id="line-271"></span><span class="hs-comment">--    then so is @'getEquivalence' f a c@.</span><span>
</span><span id="line-272"></span><span class="hs-comment">--</span><span>
</span><span id="line-273"></span><span class="hs-comment">-- The types alone do not enforce these laws, so you'll have to check them</span><span>
</span><span id="line-274"></span><span class="hs-comment">-- yourself.</span><span>
</span><span id="line-275"></span><span class="hs-keyword">newtype</span><span> </span><span id="Equivalence"><span class="annot"><a href="Data.Functor.Contravariant.html#Equivalence"><span class="hs-identifier hs-var">Equivalence</span></a></span></span><span> </span><span id="local-6989586621679583281"><span class="annot"><a href="#local-6989586621679583281"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Equivalence"><span class="annot"><a href="Data.Functor.Contravariant.html#Equivalence"><span class="hs-identifier hs-var">Equivalence</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="getEquivalence"><span class="annot"><span class="annottext">forall a. Equivalence a -&gt; a -&gt; a -&gt; Bool
</span><a href="Data.Functor.Contravariant.html#getEquivalence"><span class="hs-identifier hs-var hs-var">getEquivalence</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679583281"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679583281"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-276"></span><span>  </span><span class="hs-keyword">deriving</span><span>
</span><span id="line-277"></span><span>    </span><span class="hs-special">(</span><span> </span><span class="hs-comment">-- | @('&lt;&gt;')@ on equivalences uses logical conjunction @('&amp;&amp;')@</span><span>
</span><span id="line-278"></span><span>      </span><span class="hs-comment">-- on the results. Without newtypes this equals @'liftA2'</span><span>
</span><span id="line-279"></span><span>      </span><span class="hs-comment">-- ('liftA2' (&amp;&amp;))@.</span><span>
</span><span id="line-280"></span><span>      </span><span class="hs-comment">--</span><span>
</span><span id="line-281"></span><span>      </span><span class="hs-comment">-- @</span><span>
</span><span id="line-282"></span><span>      </span><span class="hs-comment">-- (&lt;&gt;) :: Equivalence a -&gt; Equivalence a -&gt; Equivalence a</span><span>
</span><span id="line-283"></span><span>      </span><span class="hs-comment">-- Equivalence equiv &lt;&gt; Equivalence equiv' = Equivalence \a b -&gt;</span><span>
</span><span id="line-284"></span><span>      </span><span class="hs-comment">--   equiv a b &amp;&amp; equiv a b</span><span>
</span><span id="line-285"></span><span>      </span><span class="hs-comment">-- @</span><span>
</span><span id="line-286"></span><span>      </span><span id="local-6989586621679582883"><span id="local-6989586621679582890"><span id="local-6989586621679582895"><span class="annot"><span class="annottext">NonEmpty (Equivalence a) -&gt; Equivalence a
Equivalence a -&gt; Equivalence a -&gt; Equivalence a
(Equivalence a -&gt; Equivalence a -&gt; Equivalence a)
-&gt; (NonEmpty (Equivalence a) -&gt; Equivalence a)
-&gt; (forall b. Integral b =&gt; b -&gt; Equivalence a -&gt; Equivalence a)
-&gt; Semigroup (Equivalence a)
forall b. Integral b =&gt; b -&gt; Equivalence a -&gt; Equivalence a
forall a. NonEmpty (Equivalence a) -&gt; Equivalence a
forall a. Equivalence a -&gt; Equivalence a -&gt; Equivalence a
forall a.
(a -&gt; a -&gt; a)
-&gt; (NonEmpty a -&gt; a)
-&gt; (forall b. Integral b =&gt; b -&gt; a -&gt; a)
-&gt; Semigroup a
forall a b. Integral b =&gt; b -&gt; Equivalence a -&gt; Equivalence a
stimes :: forall b. Integral b =&gt; b -&gt; Equivalence a -&gt; Equivalence a
$cstimes :: forall a b. Integral b =&gt; b -&gt; Equivalence a -&gt; Equivalence a
sconcat :: NonEmpty (Equivalence a) -&gt; Equivalence a
$csconcat :: forall a. NonEmpty (Equivalence a) -&gt; Equivalence a
&lt;&gt; :: Equivalence a -&gt; Equivalence a -&gt; Equivalence a
$c&lt;&gt; :: forall a. Equivalence a -&gt; Equivalence a -&gt; Equivalence a
</span><a href="GHC.Base.html#Semigroup"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Semigroup</span></a></span></span></span></span><span>
</span><span id="line-287"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="hs-comment">-- | @'mempty'@ on equivalences always returns @True@. Without</span><span>
</span><span id="line-288"></span><span>      </span><span class="hs-comment">-- newtypes this equals @'pure' ('pure' True)@.</span><span>
</span><span id="line-289"></span><span>      </span><span class="hs-comment">--</span><span>
</span><span id="line-290"></span><span>      </span><span class="hs-comment">-- @</span><span>
</span><span id="line-291"></span><span>      </span><span class="hs-comment">-- mempty :: Equivalence a</span><span>
</span><span id="line-292"></span><span>      </span><span class="hs-comment">-- mempty = Equivalence \_ _ -&gt; True</span><span>
</span><span id="line-293"></span><span>      </span><span class="hs-comment">-- @</span><span>
</span><span id="line-294"></span><span>      </span><span id="local-6989586621679582860"><span id="local-6989586621679582865"><span id="local-6989586621679582870"><span class="annot"><span class="annottext">Semigroup (Equivalence a)
Equivalence a
Semigroup (Equivalence a)
-&gt; Equivalence a
-&gt; (Equivalence a -&gt; Equivalence a -&gt; Equivalence a)
-&gt; ([Equivalence a] -&gt; Equivalence a)
-&gt; Monoid (Equivalence a)
[Equivalence a] -&gt; Equivalence a
Equivalence a -&gt; Equivalence a -&gt; Equivalence a
forall a. Semigroup (Equivalence a)
forall a. Equivalence a
forall a.
Semigroup a -&gt; a -&gt; (a -&gt; a -&gt; a) -&gt; ([a] -&gt; a) -&gt; Monoid a
forall a. [Equivalence a] -&gt; Equivalence a
forall a. Equivalence a -&gt; Equivalence a -&gt; Equivalence a
mconcat :: [Equivalence a] -&gt; Equivalence a
$cmconcat :: forall a. [Equivalence a] -&gt; Equivalence a
mappend :: Equivalence a -&gt; Equivalence a -&gt; Equivalence a
$cmappend :: forall a. Equivalence a -&gt; Equivalence a -&gt; Equivalence a
mempty :: Equivalence a
$cmempty :: forall a. Equivalence a
</span><a href="GHC.Base.html#Monoid"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Monoid</span></a></span></span></span></span><span>
</span><span id="line-295"></span><span>    </span><span class="hs-special">)</span><span>
</span><span id="line-296"></span><span>  </span><span class="hs-keyword">via</span><span> </span><span class="annot"><a href="#local-6989586621679583281"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679583281"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Semigroup.Internal.html#All"><span class="hs-identifier hs-type">All</span></a></span><span>
</span><span id="line-297"></span><span>
</span><span id="line-298"></span><span class="hs-comment">-- | Equivalence relations are 'Contravariant', because you can</span><span>
</span><span id="line-299"></span><span class="hs-comment">-- apply the contramapped function to each input to the equivalence</span><span>
</span><span id="line-300"></span><span class="hs-comment">-- relation.</span><span>
</span><span id="line-301"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679582850"><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Equivalence"><span class="hs-identifier hs-type">Equivalence</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-302"></span><span>  </span><span id="local-6989586621679582848"><span id="local-6989586621679582849"><span class="annot"><a href="Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-type">contramap</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679582849"><span class="hs-identifier hs-type">a'</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679582848"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Equivalence"><span class="hs-identifier hs-type">Equivalence</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679582848"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Equivalence"><span class="hs-identifier hs-type">Equivalence</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679582849"><span class="hs-identifier hs-type">a'</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-303"></span><span>  </span><span id="local-6989586621679582847"><span class="annot"><span class="annottext">contramap :: forall a' a. (a' -&gt; a) -&gt; Equivalence a -&gt; Equivalence a'
</span><a href="#local-6989586621679582847"><span class="hs-identifier hs-var hs-var hs-var hs-var">contramap</span></a></span></span><span> </span><span id="local-6989586621679582846"><span class="annot"><span class="annottext">a' -&gt; a
</span><a href="#local-6989586621679582846"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Equivalence"><span class="hs-identifier hs-type">Equivalence</span></a></span><span> </span><span id="local-6989586621679582845"><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
</span><a href="#local-6989586621679582845"><span class="hs-identifier hs-var">g</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a' -&gt; a' -&gt; Bool) -&gt; Equivalence a'
forall a. (a -&gt; a -&gt; Bool) -&gt; Equivalence a
</span><a href="Data.Functor.Contravariant.html#Equivalence"><span class="hs-identifier hs-var">Equivalence</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; a -&gt; Bool) -&gt; (a' -&gt; a) -&gt; a' -&gt; a' -&gt; Bool
forall b c a. (b -&gt; b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; a -&gt; c
</span><a href="Data.Function.html#on"><span class="hs-identifier hs-var">on</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
</span><a href="#local-6989586621679582845"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">a' -&gt; a
</span><a href="#local-6989586621679582846"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-304"></span><span>
</span><span id="line-305"></span><span class="hs-comment">-- | Check for equivalence with '=='.</span><span>
</span><span id="line-306"></span><span class="hs-comment">--</span><span>
</span><span id="line-307"></span><span class="hs-comment">-- Note: The instances for 'Double' and 'Float' violate reflexivity for @NaN@.</span><span>
</span><span id="line-308"></span><span id="local-6989586621679583273"><span class="annot"><a href="Data.Functor.Contravariant.html#defaultEquivalence"><span class="hs-identifier hs-type">defaultEquivalence</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-type">Eq</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583273"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Equivalence"><span class="hs-identifier hs-type">Equivalence</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583273"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-309"></span><span id="defaultEquivalence"><span class="annot"><span class="annottext">defaultEquivalence :: forall a. Eq a =&gt; Equivalence a
</span><a href="Data.Functor.Contravariant.html#defaultEquivalence"><span class="hs-identifier hs-var hs-var">defaultEquivalence</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; a -&gt; Bool) -&gt; Equivalence a
forall a. (a -&gt; a -&gt; Bool) -&gt; Equivalence a
</span><a href="Data.Functor.Contravariant.html#Equivalence"><span class="hs-identifier hs-var">Equivalence</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">(==)</span></a></span><span>
</span><span id="line-310"></span><span>
</span><span id="line-311"></span><span id="local-6989586621679583270"><span class="annot"><a href="Data.Functor.Contravariant.html#comparisonEquivalence"><span class="hs-identifier hs-type">comparisonEquivalence</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Comparison"><span class="hs-identifier hs-type">Comparison</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583270"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Equivalence"><span class="hs-identifier hs-type">Equivalence</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583270"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-312"></span><span id="comparisonEquivalence"><span class="annot"><span class="annottext">comparisonEquivalence :: forall a. Comparison a -&gt; Equivalence a
</span><a href="Data.Functor.Contravariant.html#comparisonEquivalence"><span class="hs-identifier hs-var hs-var">comparisonEquivalence</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Comparison"><span class="hs-identifier hs-type">Comparison</span></a></span><span> </span><span id="local-6989586621679582840"><span class="annot"><span class="annottext">a -&gt; a -&gt; Ordering
</span><a href="#local-6989586621679582840"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; a -&gt; Bool) -&gt; Equivalence a
forall a. (a -&gt; a -&gt; Bool) -&gt; Equivalence a
</span><a href="Data.Functor.Contravariant.html#Equivalence"><span class="hs-identifier hs-var">Equivalence</span></a></span><span> </span><span class="annot"><span class="annottext">((a -&gt; a -&gt; Bool) -&gt; Equivalence a)
-&gt; (a -&gt; a -&gt; Bool) -&gt; Equivalence a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679582839"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679582839"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679582838"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679582838"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Ordering
</span><a href="#local-6989586621679582840"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679582839"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679582838"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Ordering -&gt; Ordering -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#EQ"><span class="hs-identifier hs-var">EQ</span></a></span><span>
</span><span id="line-313"></span><span>
</span><span id="line-314"></span><span class="hs-comment">-- | Dual function arrows.</span><span>
</span><span id="line-315"></span><span class="hs-keyword">newtype</span><span> </span><span id="Op"><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-var">Op</span></a></span></span><span> </span><span id="local-6989586621679583265"><span class="annot"><a href="#local-6989586621679583265"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span id="local-6989586621679583264"><span class="annot"><a href="#local-6989586621679583264"><span class="hs-identifier hs-type">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Op"><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-var">Op</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="getOp"><span class="annot"><span class="annottext">forall a b. Op a b -&gt; b -&gt; a
</span><a href="Data.Functor.Contravariant.html#getOp"><span class="hs-identifier hs-var hs-var">getOp</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679583264"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679583265"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-316"></span><span>  </span><span class="hs-keyword">deriving</span><span>
</span><span id="line-317"></span><span>  </span><span class="annot"><span class="hs-keyword">newtype</span></span><span>
</span><span id="line-318"></span><span>    </span><span class="hs-special">(</span><span> </span><span class="hs-comment">-- | @('&lt;&gt;') \@(Op a b)@ without newtypes is @('&lt;&gt;') \@(b-&gt;a)@ =</span><span>
</span><span id="line-319"></span><span>      </span><span class="hs-comment">-- @liftA2 ('&lt;&gt;')@. This lifts the 'Semigroup' operation</span><span>
</span><span id="line-320"></span><span>      </span><span class="hs-comment">-- @('&lt;&gt;')@ over the output of @a@.</span><span>
</span><span id="line-321"></span><span>      </span><span class="hs-comment">--</span><span>
</span><span id="line-322"></span><span>      </span><span class="hs-comment">-- @</span><span>
</span><span id="line-323"></span><span>      </span><span class="hs-comment">-- (&lt;&gt;) :: Op a b -&gt; Op a b -&gt; Op a b</span><span>
</span><span id="line-324"></span><span>      </span><span class="hs-comment">-- Op f &lt;&gt; Op g = Op \a -&gt; f a &lt;&gt; g a</span><span>
</span><span id="line-325"></span><span>      </span><span class="hs-comment">-- @</span><span>
</span><span id="line-326"></span><span>      </span><span id="local-6989586621679582823"><span id="local-6989586621679582829"><span id="local-6989586621679582833"><span class="annot"><span class="annottext">NonEmpty (Op a b) -&gt; Op a b
Op a b -&gt; Op a b -&gt; Op a b
(Op a b -&gt; Op a b -&gt; Op a b)
-&gt; (NonEmpty (Op a b) -&gt; Op a b)
-&gt; (forall b. Integral b =&gt; b -&gt; Op a b -&gt; Op a b)
-&gt; Semigroup (Op a b)
forall b. Integral b =&gt; b -&gt; Op a b -&gt; Op a b
forall a.
(a -&gt; a -&gt; a)
-&gt; (NonEmpty a -&gt; a)
-&gt; (forall b. Integral b =&gt; b -&gt; a -&gt; a)
-&gt; Semigroup a
forall a b. Semigroup a =&gt; NonEmpty (Op a b) -&gt; Op a b
forall a b. Semigroup a =&gt; Op a b -&gt; Op a b -&gt; Op a b
forall a b b. (Semigroup a, Integral b) =&gt; b -&gt; Op a b -&gt; Op a b
stimes :: forall b. Integral b =&gt; b -&gt; Op a b -&gt; Op a b
$cstimes :: forall a b b. (Semigroup a, Integral b) =&gt; b -&gt; Op a b -&gt; Op a b
sconcat :: NonEmpty (Op a b) -&gt; Op a b
$csconcat :: forall a b. Semigroup a =&gt; NonEmpty (Op a b) -&gt; Op a b
&lt;&gt; :: Op a b -&gt; Op a b -&gt; Op a b
$c&lt;&gt; :: forall a b. Semigroup a =&gt; Op a b -&gt; Op a b -&gt; Op a b
</span><a href="GHC.Base.html#Semigroup"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Semigroup</span></a></span></span></span></span><span>
</span><span id="line-327"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="hs-comment">-- | @'mempty' \@(Op a b)@ without newtypes is @mempty \@(b-&gt;a)@</span><span>
</span><span id="line-328"></span><span>      </span><span class="hs-comment">-- = @\_ -&gt; mempty@.</span><span>
</span><span id="line-329"></span><span>      </span><span class="hs-comment">--</span><span>
</span><span id="line-330"></span><span>      </span><span class="hs-comment">-- @</span><span>
</span><span id="line-331"></span><span>      </span><span class="hs-comment">-- mempty :: Op a b</span><span>
</span><span id="line-332"></span><span>      </span><span class="hs-comment">-- mempty = Op \_ -&gt; mempty</span><span>
</span><span id="line-333"></span><span>      </span><span class="hs-comment">-- @</span><span>
</span><span id="line-334"></span><span>      </span><span id="local-6989586621679582804"><span id="local-6989586621679582808"><span id="local-6989586621679582812"><span class="annot"><span class="annottext">Semigroup (Op a b)
Op a b
Semigroup (Op a b)
-&gt; Op a b
-&gt; (Op a b -&gt; Op a b -&gt; Op a b)
-&gt; ([Op a b] -&gt; Op a b)
-&gt; Monoid (Op a b)
[Op a b] -&gt; Op a b
Op a b -&gt; Op a b -&gt; Op a b
forall a.
Semigroup a -&gt; a -&gt; (a -&gt; a -&gt; a) -&gt; ([a] -&gt; a) -&gt; Monoid a
forall {a} {b}. Monoid a =&gt; Semigroup (Op a b)
forall a b. Monoid a =&gt; Op a b
forall a b. Monoid a =&gt; [Op a b] -&gt; Op a b
forall a b. Monoid a =&gt; Op a b -&gt; Op a b -&gt; Op a b
mconcat :: [Op a b] -&gt; Op a b
$cmconcat :: forall a b. Monoid a =&gt; [Op a b] -&gt; Op a b
mappend :: Op a b -&gt; Op a b -&gt; Op a b
$cmappend :: forall a b. Monoid a =&gt; Op a b -&gt; Op a b -&gt; Op a b
mempty :: Op a b
$cmempty :: forall a b. Monoid a =&gt; Op a b
</span><a href="GHC.Base.html#Monoid"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Monoid</span></a></span></span></span></span><span>
</span><span id="line-335"></span><span>    </span><span class="hs-special">)</span><span>
</span><span id="line-336"></span><span>
</span><span id="line-337"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Control.Category.html#Category"><span class="hs-identifier hs-type">Category</span></a></span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-338"></span><span>  </span><span id="local-6989586621679582795"><span class="annot"><a href="Control.Category.html#id"><span class="hs-identifier hs-type">id</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679582795"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679582795"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-339"></span><span>  </span><span id="local-6989586621679582792"><span class="annot"><span class="annottext">id :: forall a. Op a a
</span><a href="#local-6989586621679582792"><span class="hs-identifier hs-var hs-var hs-var hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; a) -&gt; Op a a
forall a b. (b -&gt; a) -&gt; Op a b
</span><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-var">Op</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall {k} (cat :: k -&gt; k -&gt; *) (a :: k). Category cat =&gt; cat a a
</span><a href="Control.Category.html#id"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-340"></span><span>
</span><span id="line-341"></span><span>  </span><span id="local-6989586621679582789"><span id="local-6989586621679582790"><span id="local-6989586621679582791"><span class="annot"><a href="Control.Category.html#."><span class="hs-operator hs-type">(.)</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679582791"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679582790"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679582789"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679582791"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679582789"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679582790"><span class="hs-identifier hs-type">c</span></a></span></span></span></span><span>
</span><span id="line-342"></span><span>  </span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span id="local-6989586621679582787"><span class="annot"><span class="annottext">c -&gt; b
</span><a href="#local-6989586621679582787"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679582786"><span class="annot"><span class="annottext">. :: forall b c a. Op b c -&gt; Op a b -&gt; Op a c
</span><a href="#local-6989586621679582786"><span class="hs-operator hs-var hs-var hs-var hs-var">.</span></a></span></span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span id="local-6989586621679582785"><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582785"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(c -&gt; a) -&gt; Op a c
forall a b. (b -&gt; a) -&gt; Op a b
</span><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-var">Op</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582785"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; (c -&gt; b) -&gt; c -&gt; a
forall {k} (cat :: k -&gt; k -&gt; *) (b :: k) (c :: k) (a :: k).
Category cat =&gt;
cat b c -&gt; cat a b -&gt; cat a c
</span><a href="Control.Category.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">c -&gt; b
</span><a href="#local-6989586621679582787"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-343"></span><span>
</span><span id="line-344"></span><span id="local-6989586621679583296"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679582782"><span class="annot"><a href="Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583296"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-345"></span><span>  </span><span id="local-6989586621679582780"><span id="local-6989586621679582781"><span class="annot"><a href="Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-type">contramap</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679582781"><span class="hs-identifier hs-type">b'</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679582780"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583296"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679582780"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583296"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679582781"><span class="hs-identifier hs-type">b'</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-346"></span><span>  </span><span id="local-6989586621679582778"><span class="annot"><span class="annottext">contramap :: forall a' a. (a' -&gt; a) -&gt; Op a a -&gt; Op a a'
</span><a href="#local-6989586621679582778"><span class="hs-identifier hs-var hs-var hs-var hs-var">contramap</span></a></span></span><span> </span><span id="local-6989586621679582777"><span class="annot"><span class="annottext">b' -&gt; b
</span><a href="#local-6989586621679582777"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679582776"><span class="annot"><span class="annottext">Op a b
</span><a href="#local-6989586621679582776"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b' -&gt; a) -&gt; Op a b'
forall a b. (b -&gt; a) -&gt; Op a b
</span><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-var">Op</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Op a b -&gt; b -&gt; a
forall a b. Op a b -&gt; b -&gt; a
</span><a href="Data.Functor.Contravariant.html#getOp"><span class="hs-identifier hs-var hs-var">getOp</span></a></span><span> </span><span class="annot"><span class="annottext">Op a b
</span><a href="#local-6989586621679582776"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; (b' -&gt; b) -&gt; b' -&gt; a
forall {k} (cat :: k -&gt; k -&gt; *) (b :: k) (c :: k) (a :: k).
Category cat =&gt;
cat b c -&gt; cat a b -&gt; cat a c
</span><a href="Control.Category.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">b' -&gt; b
</span><a href="#local-6989586621679582777"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-347"></span><span>
</span><span id="line-348"></span><span id="local-6989586621679583246"><span id="local-6989586621679583247"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679582771"><span class="annot"><a href="GHC.Num.html#Num"><span class="hs-identifier hs-type">Num</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583247"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Num.html#Num"><span class="hs-identifier hs-type">Num</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583247"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583246"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-349"></span><span>  </span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span id="local-6989586621679582765"><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582765"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679582764"><span class="annot"><span class="annottext">+ :: Op a b -&gt; Op a b -&gt; Op a b
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var hs-var hs-var hs-var">+</span></a></span></span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span id="local-6989586621679582762"><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582762"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; Op a b
forall a b. (b -&gt; a) -&gt; Op a b
</span><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-var">Op</span></a></span><span> </span><span class="annot"><span class="annottext">((b -&gt; a) -&gt; Op a b) -&gt; (b -&gt; a) -&gt; Op a b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679582761"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679582761"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582765"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679582761"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582762"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679582761"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-350"></span><span>  </span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span id="local-6989586621679582759"><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582759"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679582758"><span class="annot"><span class="annottext">* :: Op a b -&gt; Op a b -&gt; Op a b
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var hs-var hs-var hs-var">*</span></a></span></span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span id="local-6989586621679582756"><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582756"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; Op a b
forall a b. (b -&gt; a) -&gt; Op a b
</span><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-var">Op</span></a></span><span> </span><span class="annot"><span class="annottext">((b -&gt; a) -&gt; Op a b) -&gt; (b -&gt; a) -&gt; Op a b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679582755"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679582755"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582759"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679582755"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582756"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679582755"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-351"></span><span>  </span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span id="local-6989586621679582753"><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582753"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679582752"><span class="annot"><span class="annottext">- :: Op a b -&gt; Op a b -&gt; Op a b
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var hs-var hs-var hs-var">-</span></a></span></span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span id="local-6989586621679582751"><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582751"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; Op a b
forall a b. (b -&gt; a) -&gt; Op a b
</span><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-var">Op</span></a></span><span> </span><span class="annot"><span class="annottext">((b -&gt; a) -&gt; Op a b) -&gt; (b -&gt; a) -&gt; Op a b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679582750"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679582750"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582753"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679582750"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582751"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679582750"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-352"></span><span>  </span><span id="local-6989586621679582747"><span class="annot"><span class="annottext">abs :: Op a b -&gt; Op a b
</span><a href="GHC.Num.html#abs"><span class="hs-identifier hs-var hs-var hs-var hs-var">abs</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span id="local-6989586621679582745"><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582745"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; Op a b
forall a b. (b -&gt; a) -&gt; Op a b
</span><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-var">Op</span></a></span><span> </span><span class="annot"><span class="annottext">((b -&gt; a) -&gt; Op a b) -&gt; (b -&gt; a) -&gt; Op a b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Num a =&gt; a -&gt; a
</span><a href="GHC.Num.html#abs"><span class="hs-identifier hs-var">abs</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; a) -&gt; (b -&gt; a) -&gt; b -&gt; a
forall {k} (cat :: k -&gt; k -&gt; *) (b :: k) (c :: k) (a :: k).
Category cat =&gt;
cat b c -&gt; cat a b -&gt; cat a c
</span><a href="Control.Category.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582745"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-353"></span><span>  </span><span id="local-6989586621679582742"><span class="annot"><span class="annottext">signum :: Op a b -&gt; Op a b
</span><a href="GHC.Num.html#signum"><span class="hs-identifier hs-var hs-var hs-var hs-var">signum</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span id="local-6989586621679582740"><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582740"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; Op a b
forall a b. (b -&gt; a) -&gt; Op a b
</span><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-var">Op</span></a></span><span> </span><span class="annot"><span class="annottext">((b -&gt; a) -&gt; Op a b) -&gt; (b -&gt; a) -&gt; Op a b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Num a =&gt; a -&gt; a
</span><a href="GHC.Num.html#signum"><span class="hs-identifier hs-var">signum</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; a) -&gt; (b -&gt; a) -&gt; b -&gt; a
forall {k} (cat :: k -&gt; k -&gt; *) (b :: k) (c :: k) (a :: k).
Category cat =&gt;
cat b c -&gt; cat a b -&gt; cat a c
</span><a href="Control.Category.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582740"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-354"></span><span>  </span><span id="local-6989586621679582736"><span class="annot"><span class="annottext">fromInteger :: Integer -&gt; Op a b
</span><a href="GHC.Num.html#fromInteger"><span class="hs-identifier hs-var hs-var hs-var hs-var">fromInteger</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; Op a b
forall a b. (b -&gt; a) -&gt; Op a b
</span><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-var">Op</span></a></span><span> </span><span class="annot"><span class="annottext">((b -&gt; a) -&gt; Op a b) -&gt; (Integer -&gt; b -&gt; a) -&gt; Integer -&gt; Op a b
forall {k} (cat :: k -&gt; k -&gt; *) (b :: k) (c :: k) (a :: k).
Category cat =&gt;
cat b c -&gt; cat a b -&gt; cat a c
</span><a href="Control.Category.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; a
forall a b. a -&gt; b -&gt; a
</span><a href="GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; a) -&gt; (Integer -&gt; a) -&gt; Integer -&gt; b -&gt; a
forall {k} (cat :: k -&gt; k -&gt; *) (b :: k) (c :: k) (a :: k).
Category cat =&gt;
cat b c -&gt; cat a b -&gt; cat a c
</span><a href="Control.Category.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; a
forall a. Num a =&gt; Integer -&gt; a
</span><a href="GHC.Num.html#fromInteger"><span class="hs-identifier hs-var">fromInteger</span></a></span></span></span><span>
</span><span id="line-355"></span><span>
</span><span id="line-356"></span><span id="local-6989586621679583241"><span id="local-6989586621679583242"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="GHC.Real.html#Fractional"><span class="hs-identifier hs-type">Fractional</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583242"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Real.html#Fractional"><span class="hs-identifier hs-type">Fractional</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583242"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583241"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-357"></span><span>  </span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span id="local-6989586621679582724"><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582724"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679582723"><span class="annot"><span class="annottext">/ :: Op a b -&gt; Op a b -&gt; Op a b
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var hs-var hs-var hs-var">/</span></a></span></span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span id="local-6989586621679582721"><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582721"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; Op a b
forall a b. (b -&gt; a) -&gt; Op a b
</span><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-var">Op</span></a></span><span> </span><span class="annot"><span class="annottext">((b -&gt; a) -&gt; Op a b) -&gt; (b -&gt; a) -&gt; Op a b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679582720"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679582720"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582724"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679582720"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582721"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679582720"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-358"></span><span>  </span><span id="local-6989586621679582717"><span class="annot"><span class="annottext">recip :: Op a b -&gt; Op a b
</span><a href="GHC.Real.html#recip"><span class="hs-identifier hs-var hs-var hs-var hs-var">recip</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span id="local-6989586621679582715"><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582715"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; Op a b
forall a b. (b -&gt; a) -&gt; Op a b
</span><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-var">Op</span></a></span><span> </span><span class="annot"><span class="annottext">((b -&gt; a) -&gt; Op a b) -&gt; (b -&gt; a) -&gt; Op a b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Fractional a =&gt; a -&gt; a
</span><a href="GHC.Real.html#recip"><span class="hs-identifier hs-var">recip</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; a) -&gt; (b -&gt; a) -&gt; b -&gt; a
forall {k} (cat :: k -&gt; k -&gt; *) (b :: k) (c :: k) (a :: k).
Category cat =&gt;
cat b c -&gt; cat a b -&gt; cat a c
</span><a href="Control.Category.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582715"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-359"></span><span>  </span><span id="local-6989586621679582711"><span class="annot"><span class="annottext">fromRational :: Rational -&gt; Op a b
</span><a href="GHC.Real.html#fromRational"><span class="hs-identifier hs-var hs-var hs-var hs-var">fromRational</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; Op a b
forall a b. (b -&gt; a) -&gt; Op a b
</span><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-var">Op</span></a></span><span> </span><span class="annot"><span class="annottext">((b -&gt; a) -&gt; Op a b) -&gt; (Rational -&gt; b -&gt; a) -&gt; Rational -&gt; Op a b
forall {k} (cat :: k -&gt; k -&gt; *) (b :: k) (c :: k) (a :: k).
Category cat =&gt;
cat b c -&gt; cat a b -&gt; cat a c
</span><a href="Control.Category.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; a
forall a b. a -&gt; b -&gt; a
</span><a href="GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; a) -&gt; (Rational -&gt; a) -&gt; Rational -&gt; b -&gt; a
forall {k} (cat :: k -&gt; k -&gt; *) (b :: k) (c :: k) (a :: k).
Category cat =&gt;
cat b c -&gt; cat a b -&gt; cat a c
</span><a href="Control.Category.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Rational -&gt; a
forall a. Fractional a =&gt; Rational -&gt; a
</span><a href="GHC.Real.html#fromRational"><span class="hs-identifier hs-var">fromRational</span></a></span></span></span><span>
</span><span id="line-360"></span><span>
</span><span id="line-361"></span><span id="local-6989586621679583238"><span id="local-6989586621679583239"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679582683"><span id="local-6989586621679582685"><span id="local-6989586621679582687"><span id="local-6989586621679582689"><span class="annot"><a href="GHC.Float.html#Floating"><span class="hs-identifier hs-type">Floating</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583239"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Float.html#Floating"><span class="hs-identifier hs-type">Floating</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583239"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679583238"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-362"></span><span>  </span><span id="local-6989586621679582680"><span class="annot"><span class="annottext">pi :: Op a b
</span><a href="GHC.Float.html#pi"><span class="hs-identifier hs-var hs-var hs-var hs-var">pi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; Op a b
forall a b. (b -&gt; a) -&gt; Op a b
</span><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-var">Op</span></a></span><span> </span><span class="annot"><span class="annottext">((b -&gt; a) -&gt; Op a b) -&gt; (b -&gt; a) -&gt; Op a b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; a
forall a b. a -&gt; b -&gt; a
</span><a href="GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="annot"><span class="annottext">a
forall a. Floating a =&gt; a
</span><a href="GHC.Float.html#pi"><span class="hs-identifier hs-var">pi</span></a></span><span>
</span><span id="line-363"></span><span>  </span><span id="local-6989586621679582676"><span class="annot"><span class="annottext">exp :: Op a b -&gt; Op a b
</span><a href="GHC.Float.html#exp"><span class="hs-identifier hs-var hs-var hs-var hs-var">exp</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span id="local-6989586621679582674"><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582674"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; Op a b
forall a b. (b -&gt; a) -&gt; Op a b
</span><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-var">Op</span></a></span><span> </span><span class="annot"><span class="annottext">((b -&gt; a) -&gt; Op a b) -&gt; (b -&gt; a) -&gt; Op a b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#exp"><span class="hs-identifier hs-var">exp</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; a) -&gt; (b -&gt; a) -&gt; b -&gt; a
forall {k} (cat :: k -&gt; k -&gt; *) (b :: k) (c :: k) (a :: k).
Category cat =&gt;
cat b c -&gt; cat a b -&gt; cat a c
</span><a href="Control.Category.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582674"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-364"></span><span>  </span><span id="local-6989586621679582671"><span class="annot"><span class="annottext">sqrt :: Op a b -&gt; Op a b
</span><a href="GHC.Float.html#sqrt"><span class="hs-identifier hs-var hs-var hs-var hs-var">sqrt</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span id="local-6989586621679582669"><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582669"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; Op a b
forall a b. (b -&gt; a) -&gt; Op a b
</span><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-var">Op</span></a></span><span> </span><span class="annot"><span class="annottext">((b -&gt; a) -&gt; Op a b) -&gt; (b -&gt; a) -&gt; Op a b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#sqrt"><span class="hs-identifier hs-var">sqrt</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; a) -&gt; (b -&gt; a) -&gt; b -&gt; a
forall {k} (cat :: k -&gt; k -&gt; *) (b :: k) (c :: k) (a :: k).
Category cat =&gt;
cat b c -&gt; cat a b -&gt; cat a c
</span><a href="Control.Category.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582669"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-365"></span><span>  </span><span id="local-6989586621679582666"><span class="annot"><span class="annottext">log :: Op a b -&gt; Op a b
</span><a href="GHC.Float.html#log"><span class="hs-identifier hs-var hs-var hs-var hs-var">log</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span id="local-6989586621679582664"><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582664"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; Op a b
forall a b. (b -&gt; a) -&gt; Op a b
</span><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-var">Op</span></a></span><span> </span><span class="annot"><span class="annottext">((b -&gt; a) -&gt; Op a b) -&gt; (b -&gt; a) -&gt; Op a b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#log"><span class="hs-identifier hs-var">log</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; a) -&gt; (b -&gt; a) -&gt; b -&gt; a
forall {k} (cat :: k -&gt; k -&gt; *) (b :: k) (c :: k) (a :: k).
Category cat =&gt;
cat b c -&gt; cat a b -&gt; cat a c
</span><a href="Control.Category.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582664"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-366"></span><span>  </span><span id="local-6989586621679582661"><span class="annot"><span class="annottext">sin :: Op a b -&gt; Op a b
</span><a href="GHC.Float.html#sin"><span class="hs-identifier hs-var hs-var hs-var hs-var">sin</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span id="local-6989586621679582659"><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582659"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; Op a b
forall a b. (b -&gt; a) -&gt; Op a b
</span><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-var">Op</span></a></span><span> </span><span class="annot"><span class="annottext">((b -&gt; a) -&gt; Op a b) -&gt; (b -&gt; a) -&gt; Op a b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#sin"><span class="hs-identifier hs-var">sin</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; a) -&gt; (b -&gt; a) -&gt; b -&gt; a
forall {k} (cat :: k -&gt; k -&gt; *) (b :: k) (c :: k) (a :: k).
Category cat =&gt;
cat b c -&gt; cat a b -&gt; cat a c
</span><a href="Control.Category.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582659"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-367"></span><span>  </span><span id="local-6989586621679582656"><span class="annot"><span class="annottext">tan :: Op a b -&gt; Op a b
</span><a href="GHC.Float.html#tan"><span class="hs-identifier hs-var hs-var hs-var hs-var">tan</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span id="local-6989586621679582654"><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582654"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; Op a b
forall a b. (b -&gt; a) -&gt; Op a b
</span><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-var">Op</span></a></span><span> </span><span class="annot"><span class="annottext">((b -&gt; a) -&gt; Op a b) -&gt; (b -&gt; a) -&gt; Op a b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#tan"><span class="hs-identifier hs-var">tan</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; a) -&gt; (b -&gt; a) -&gt; b -&gt; a
forall {k} (cat :: k -&gt; k -&gt; *) (b :: k) (c :: k) (a :: k).
Category cat =&gt;
cat b c -&gt; cat a b -&gt; cat a c
</span><a href="Control.Category.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582654"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-368"></span><span>  </span><span id="local-6989586621679582651"><span class="annot"><span class="annottext">cos :: Op a b -&gt; Op a b
</span><a href="GHC.Float.html#cos"><span class="hs-identifier hs-var hs-var hs-var hs-var">cos</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span id="local-6989586621679582649"><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582649"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; Op a b
forall a b. (b -&gt; a) -&gt; Op a b
</span><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-var">Op</span></a></span><span> </span><span class="annot"><span class="annottext">((b -&gt; a) -&gt; Op a b) -&gt; (b -&gt; a) -&gt; Op a b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#cos"><span class="hs-identifier hs-var">cos</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; a) -&gt; (b -&gt; a) -&gt; b -&gt; a
forall {k} (cat :: k -&gt; k -&gt; *) (b :: k) (c :: k) (a :: k).
Category cat =&gt;
cat b c -&gt; cat a b -&gt; cat a c
</span><a href="Control.Category.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582649"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-369"></span><span>  </span><span id="local-6989586621679582646"><span class="annot"><span class="annottext">asin :: Op a b -&gt; Op a b
</span><a href="GHC.Float.html#asin"><span class="hs-identifier hs-var hs-var hs-var hs-var">asin</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span id="local-6989586621679582644"><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582644"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; Op a b
forall a b. (b -&gt; a) -&gt; Op a b
</span><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-var">Op</span></a></span><span> </span><span class="annot"><span class="annottext">((b -&gt; a) -&gt; Op a b) -&gt; (b -&gt; a) -&gt; Op a b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#asin"><span class="hs-identifier hs-var">asin</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; a) -&gt; (b -&gt; a) -&gt; b -&gt; a
forall {k} (cat :: k -&gt; k -&gt; *) (b :: k) (c :: k) (a :: k).
Category cat =&gt;
cat b c -&gt; cat a b -&gt; cat a c
</span><a href="Control.Category.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582644"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-370"></span><span>  </span><span id="local-6989586621679582641"><span class="annot"><span class="annottext">atan :: Op a b -&gt; Op a b
</span><a href="GHC.Float.html#atan"><span class="hs-identifier hs-var hs-var hs-var hs-var">atan</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span id="local-6989586621679582639"><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582639"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; Op a b
forall a b. (b -&gt; a) -&gt; Op a b
</span><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-var">Op</span></a></span><span> </span><span class="annot"><span class="annottext">((b -&gt; a) -&gt; Op a b) -&gt; (b -&gt; a) -&gt; Op a b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#atan"><span class="hs-identifier hs-var">atan</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; a) -&gt; (b -&gt; a) -&gt; b -&gt; a
forall {k} (cat :: k -&gt; k -&gt; *) (b :: k) (c :: k) (a :: k).
Category cat =&gt;
cat b c -&gt; cat a b -&gt; cat a c
</span><a href="Control.Category.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582639"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-371"></span><span>  </span><span id="local-6989586621679582636"><span class="annot"><span class="annottext">acos :: Op a b -&gt; Op a b
</span><a href="GHC.Float.html#acos"><span class="hs-identifier hs-var hs-var hs-var hs-var">acos</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span id="local-6989586621679582634"><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582634"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; Op a b
forall a b. (b -&gt; a) -&gt; Op a b
</span><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-var">Op</span></a></span><span> </span><span class="annot"><span class="annottext">((b -&gt; a) -&gt; Op a b) -&gt; (b -&gt; a) -&gt; Op a b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#acos"><span class="hs-identifier hs-var">acos</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; a) -&gt; (b -&gt; a) -&gt; b -&gt; a
forall {k} (cat :: k -&gt; k -&gt; *) (b :: k) (c :: k) (a :: k).
Category cat =&gt;
cat b c -&gt; cat a b -&gt; cat a c
</span><a href="Control.Category.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582634"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-372"></span><span>  </span><span id="local-6989586621679582631"><span class="annot"><span class="annottext">sinh :: Op a b -&gt; Op a b
</span><a href="GHC.Float.html#sinh"><span class="hs-identifier hs-var hs-var hs-var hs-var">sinh</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span id="local-6989586621679582629"><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582629"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; Op a b
forall a b. (b -&gt; a) -&gt; Op a b
</span><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-var">Op</span></a></span><span> </span><span class="annot"><span class="annottext">((b -&gt; a) -&gt; Op a b) -&gt; (b -&gt; a) -&gt; Op a b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#sinh"><span class="hs-identifier hs-var">sinh</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; a) -&gt; (b -&gt; a) -&gt; b -&gt; a
forall {k} (cat :: k -&gt; k -&gt; *) (b :: k) (c :: k) (a :: k).
Category cat =&gt;
cat b c -&gt; cat a b -&gt; cat a c
</span><a href="Control.Category.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582629"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-373"></span><span>  </span><span id="local-6989586621679582626"><span class="annot"><span class="annottext">tanh :: Op a b -&gt; Op a b
</span><a href="GHC.Float.html#tanh"><span class="hs-identifier hs-var hs-var hs-var hs-var">tanh</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span id="local-6989586621679582624"><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582624"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; Op a b
forall a b. (b -&gt; a) -&gt; Op a b
</span><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-var">Op</span></a></span><span> </span><span class="annot"><span class="annottext">((b -&gt; a) -&gt; Op a b) -&gt; (b -&gt; a) -&gt; Op a b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#tanh"><span class="hs-identifier hs-var">tanh</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; a) -&gt; (b -&gt; a) -&gt; b -&gt; a
forall {k} (cat :: k -&gt; k -&gt; *) (b :: k) (c :: k) (a :: k).
Category cat =&gt;
cat b c -&gt; cat a b -&gt; cat a c
</span><a href="Control.Category.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582624"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-374"></span><span>  </span><span id="local-6989586621679582621"><span class="annot"><span class="annottext">cosh :: Op a b -&gt; Op a b
</span><a href="GHC.Float.html#cosh"><span class="hs-identifier hs-var hs-var hs-var hs-var">cosh</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span id="local-6989586621679582619"><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582619"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; Op a b
forall a b. (b -&gt; a) -&gt; Op a b
</span><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-var">Op</span></a></span><span> </span><span class="annot"><span class="annottext">((b -&gt; a) -&gt; Op a b) -&gt; (b -&gt; a) -&gt; Op a b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#cosh"><span class="hs-identifier hs-var">cosh</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; a) -&gt; (b -&gt; a) -&gt; b -&gt; a
forall {k} (cat :: k -&gt; k -&gt; *) (b :: k) (c :: k) (a :: k).
Category cat =&gt;
cat b c -&gt; cat a b -&gt; cat a c
</span><a href="Control.Category.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582619"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-375"></span><span>  </span><span id="local-6989586621679582616"><span class="annot"><span class="annottext">asinh :: Op a b -&gt; Op a b
</span><a href="GHC.Float.html#asinh"><span class="hs-identifier hs-var hs-var hs-var hs-var">asinh</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span id="local-6989586621679582614"><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582614"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; Op a b
forall a b. (b -&gt; a) -&gt; Op a b
</span><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-var">Op</span></a></span><span> </span><span class="annot"><span class="annottext">((b -&gt; a) -&gt; Op a b) -&gt; (b -&gt; a) -&gt; Op a b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#asinh"><span class="hs-identifier hs-var">asinh</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; a) -&gt; (b -&gt; a) -&gt; b -&gt; a
forall {k} (cat :: k -&gt; k -&gt; *) (b :: k) (c :: k) (a :: k).
Category cat =&gt;
cat b c -&gt; cat a b -&gt; cat a c
</span><a href="Control.Category.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582614"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-376"></span><span>  </span><span id="local-6989586621679582611"><span class="annot"><span class="annottext">atanh :: Op a b -&gt; Op a b
</span><a href="GHC.Float.html#atanh"><span class="hs-identifier hs-var hs-var hs-var hs-var">atanh</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span id="local-6989586621679582609"><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582609"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; Op a b
forall a b. (b -&gt; a) -&gt; Op a b
</span><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-var">Op</span></a></span><span> </span><span class="annot"><span class="annottext">((b -&gt; a) -&gt; Op a b) -&gt; (b -&gt; a) -&gt; Op a b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#atanh"><span class="hs-identifier hs-var">atanh</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; a) -&gt; (b -&gt; a) -&gt; b -&gt; a
forall {k} (cat :: k -&gt; k -&gt; *) (b :: k) (c :: k) (a :: k).
Category cat =&gt;
cat b c -&gt; cat a b -&gt; cat a c
</span><a href="Control.Category.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582609"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-377"></span><span>  </span><span id="local-6989586621679582606"><span class="annot"><span class="annottext">acosh :: Op a b -&gt; Op a b
</span><a href="GHC.Float.html#acosh"><span class="hs-identifier hs-var hs-var hs-var hs-var">acosh</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span id="local-6989586621679582604"><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582604"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; Op a b
forall a b. (b -&gt; a) -&gt; Op a b
</span><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-var">Op</span></a></span><span> </span><span class="annot"><span class="annottext">((b -&gt; a) -&gt; Op a b) -&gt; (b -&gt; a) -&gt; Op a b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#acosh"><span class="hs-identifier hs-var">acosh</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; a) -&gt; (b -&gt; a) -&gt; b -&gt; a
forall {k} (cat :: k -&gt; k -&gt; *) (b :: k) (c :: k) (a :: k).
Category cat =&gt;
cat b c -&gt; cat a b -&gt; cat a c
</span><a href="Control.Category.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582604"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-378"></span><span>  </span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span id="local-6989586621679582602"><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582602"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679582601"><span class="annot"><span class="annottext">** :: Op a b -&gt; Op a b -&gt; Op a b
</span><a href="GHC.Float.html#%2A%2A"><span class="hs-operator hs-var hs-var hs-var hs-var">**</span></a></span></span><span> </span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span id="local-6989586621679582599"><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582599"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; Op a b
forall a b. (b -&gt; a) -&gt; Op a b
</span><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-var">Op</span></a></span><span> </span><span class="annot"><span class="annottext">((b -&gt; a) -&gt; Op a b) -&gt; (b -&gt; a) -&gt; Op a b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679582598"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679582598"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582602"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679582598"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Floating a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Float.html#%2A%2A"><span class="hs-operator hs-var">**</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582599"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679582598"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-379"></span><span>  </span><span id="local-6989586621679582596"><span class="annot"><span class="annottext">logBase :: Op a b -&gt; Op a b -&gt; Op a b
</span><a href="GHC.Float.html#logBase"><span class="hs-identifier hs-var hs-var hs-var hs-var">logBase</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span id="local-6989586621679582594"><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582594"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-type">Op</span></a></span><span> </span><span id="local-6989586621679582593"><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582593"><span class="hs-identifier hs-var">g</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; Op a b
forall a b. (b -&gt; a) -&gt; Op a b
</span><a href="Data.Functor.Contravariant.html#Op"><span class="hs-identifier hs-var">Op</span></a></span><span> </span><span class="annot"><span class="annottext">((b -&gt; a) -&gt; Op a b) -&gt; (b -&gt; a) -&gt; Op a b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679582592"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679582592"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Floating a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Float.html#logBase"><span class="hs-identifier hs-var">logBase</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582594"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679582592"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679582593"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679582592"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-380"></span></pre></body></html>